I am validating form fields on blur event in jquery. How do I validate more than 1 field in the controller action called from ajax with $params['form']. Code I m trying is:
//ajax action in controller function ajax_validate() { Configure::write('debug', 0); if($this->RequestHandler->isAjax()) { $this->data['User'][$this->params['form']['field']] = $this->params['form']['value']; $this->User->set($this->data); if($this->User->validates()) { $this->autoRender = false; } else { $errorArray = $this->validateErrors($this->User); $this->set('error', $errorArray[$this->params['form'] ['field']]); } } }