dimis283
(Dimis283)
October 26, 2009, 7:57am
1
I ahve a very strange problem.
When I do not fill the email address of the user form the error apears twice
I have at controller
...$model=new Users;
$model->scenario='newuser';...
at model
array('usr_type','required'),
array('usr_email','required'),
array('usr_email','email'),
array('usr_email','unique'),
What is wrong?
jayrulez
(Waprave)
October 26, 2009, 10:33am
2
I ahve a very strange problem.
When I do not fill the email address of the user form the error apears twice
I have at controller
...$model=new Users;
$model->scenario='newuser';...
at model
array('usr_type','required'),
array('usr_email','required'),
array('usr_email','email'),
array('usr_email','unique'),
What is wrong?
i think the validation rule for email assumes that it must be required so using both ‘required’ and ‘email’ would be redundant. try removing the required rule for email
dimis283
(Dimis283)
October 26, 2009, 11:29am
3
I did it and it worked.
I have also these rules at company model and it has no problem