Validation rule - access other field CakePHP -
i try write custom validation rule , need other fields of model data gonna save make validation happen. can't find way pass data custom validation rule.
array validate:
[user] [name] => 'bob' [message] => 'this message'
validate:
public $validate = array( 'message' => array( 'rule' => 'customvalidatefunction' ) );
custom validate function:
public function customvalidatefunction($messagearray){ $valueofmessage = $messagearray['message']; $valueofname = ? return true; }
can point me in right direction?
Comments
Post a Comment