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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -