Hi, the data validation in my User Model always return true. Can anybody tell me why?
In Model: var $validate = array ( 'login' => array ( 'notempty' => array ( 'rule' => array('custom', VALID_NOT_EMPTY), 'message' => 'Error' ), 'unique' => array ( 'rule' => 'isUnique', 'message' => 'Error' ), 'minlength' => array ( 'rule' => array ('minLength', '5'), 'message' => 'Error' ), 'alphanumeric' => array ( 'rule' => 'alphaNumeric', 'message' => 'Error ) ), 'passwd' => array ( 'minlength' => array ( 'rule' => array ('minLength', '8'), 'message' => 'Error' ) ), 'title' => array ( 'rule' => array ('inList', array ('Mr.', 'Mrs.')), 'message' => 'Error' ), 'forename' => array ( 'rule' => array('custom', VALID_NOT_EMPTY), 'message' => 'Error' ), 'name' => array ( 'rule' => array('custom', VALID_NOT_EMPTY), 'message' => 'Error' ), 'email' => array ( 'rule' => array ('email', true), 'message' => 'Error' ) ); In Controller: $this->User->validates($this->data); // always return true $this->User->save($this->data); // always return true, and try to save the data, which is of course error, due to NOT NULL constrains in database. Thanks for the help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---