Saturday, 17 August 2013

cakephp errors - validation displayed twice

cakephp errors - validation displayed twice

I'm using cake 2.3.8 version. I have a registration form where users can
enter in a username and password in the form. My model validation looks
like:
public $validate = array(
'username' => array(
'required' => array(
'rule' => array('notEmpty'),
'message' => 'A username is required'
),
'alphanumeric' => array(
'rule' => 'alphaNumeric',
'message' => 'Usernames must only contain letters and numbers.'
)
),
'password' => array(
'required' => array(
'rule' => array('notEmpty'),
'message' => 'A password is required'
)
) );
Now the weird thing is in my site when I enter in a username with space in
it, the validation is displayed twice. But when I use the Family
registration form and enter a username with space in it, the validation
error only displays once. Does anyone know what could be the issue?

No comments:

Post a Comment