class UserRegForm extends CFormModel
{
public $email; // email is login account name, needs to be unique
public $first;
public $last;
public $password;
public $passwordRepeat; ... }
Here is the compare validator to make sure password and its repeat are the same.
It matters certainly if you use ajax validation… as it could happen that the validation is performed while there is nothing entered in the confirm field…
can you post your view file and the actionLogin() code
I know this is an old topic, but since there is no answer listed, here’s what I found to be the problem in the same situation.
The values in the form that was received in the POST would be mass assigned to the model. However, there was no validation rule for passwordRepeat, which meant that it would not be set during mass assignment. As such the comparison would fail. Adding this line in the rules should suffice: