10
I wonder if it is possible with CakePHP validation rules to validate a field depending on another.
I have been reading the documentation about custom validation rules but the $check param only contains the value of the current field to validate.
For example. I would like to define the verify_password field as required only if the new_password field is not empty. (in case
I could do it with Javascript anyway but i wonder if it is possible to do it directly with CakePHP.