Hi, i am using cakePHP for a simple script and i am trying to validate the inout fields... The code seems to be ok, but for some reason it is not validating the data... plz help! The model <?php class inviteApply extends AppModel { var $name = 'inviteApply'; var $validate = array('email' => 'email'); } ?> PHP: The controller $this->inviteApply->set($this->data); if ($this->inviteApply->validates()) { $this->inviteApply->save($this->data); } else { print_r($this->Product->invalidFields());die(); } PHP: Thanx
Not sure if this is of use to you but it will create the validation rules for your application input http://www.validcake.com/