Hello guys,
I want to validate the length of my password using the cakephp model's
validation. However, since the password is being hashed before it is
saved on the database, my length validation criteria becomes void. We
all know that a hashed password contains many characters.
Here is my model validation criteria:
var $validate = array(
'username' => array(
'isalphanumeric' => array(
'rule' => array('alphanumeric'),
'required' => true,
'allowEmpty' => false,
'message' => 'Only letters and numbers are
allowed.'
),
'unique' => array(
'rule' => array('checkUnique', 'username'),
'message' => 'User name taken. Please use
another.'
),
'notempty' => array(
'rule' => array('minLength', '6'),
'required' => true,
'allowEmpty' => false,
'message' => 'Username must have at least 6
characters'
)
),
'password' => array(
'rule' => array('minLength', '6'),
'required' => true,
'allowEmpty' => false,
'message' => 'Password must have at least 6
characters'
)
);
You can see there that I want my password to have at least 6
characters. Anyone of you have an idea on how to do this?
Thanks,
Mario
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---