Ok I got it done. It works. The problem was in my jquery code.
On May 4, 10:56 pm, ZedR <zuberchataiw...@gmail.com> wrote: > I am validating form fields on blur event injquery. 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']]); > } > } > }