I have Auth system, and In my user model, I have a validation soemething like this:
================================================== var $validate = array( ... 'password' => array( 'sameCheck' => array( 'rule' => array('sameCheck', 'password_confirm'), 'message' => 'Passwords do not match.' ) ), 'password_confirm' => array( 'no_empty'=>array( 'rule'=>'notEmpty', 'message'=>'Please enter a password' ) ), ...... } function sameCheck($data, $target) { return strcmp(array_shift($data), AuthComponent::password($this- >data[$this->name][$target])) == 0; } ================================================== users_controller.php : $this->data has only User.id and User.name but still password/password_confirm field cakephp error is preventing saving new data. ================================================== ... $this->Member->set($this->data); if(($this->Member->validates())){ ... ================================================== When creating new user everything working fine but when editing user information without password. I get cakephp error "Undefined index: password_confirm" I only let user edit one filed (ex. user name) but password_confirm error showing. There is no password/password_confirm field but how come this part of validation keep showing? anyone any idea? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en