I've made a custom validation for a password field real simple
'pass_confirm' => array(
'samePass' => array('rule' =>
array('samePass'),
'message' => 'Passwords do not match.'
)
),
function samePass($data) {
if ( $this->data['User']['password'] ==
$data['pass_confirm'] )
{
return true;
} else {
return false;
}
}
well whenever the passwords do not match it shows the error message
twice, once before the input and once after the input, this is all I
have, they both have the same class error-message so I don't know why
there is 2.
if ($form->isFieldError('User.pass_confirm')) { e($form-
>error('User.pass_confirm', null));} e($form-
>input('pass_confirm',array('label'=>'Confirm
Password:','type'=>'password')) . "<br />\n");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---