CakePHP 2 - Validating password fields
问题 I have some problem with Cakephp 2 validation. I am trying to validate several fields on an Edit form. Some of them are a password and confirm password fields. I want to validate both only if they are supplied. If they are empty I dont change the password, but if the user writes over them I would like to validate if they have a minLength or the passwords matchs. Code: 'pwd' => array( 'length' => array( 'rule' => array('between', 8, 40), 'message' => 'Your password must be between 8 and 40