I added senario to rules like this:
array('username, password, password2, email', 'required','on'=>'register'),
It worded before, but after a while, strange thing happens:
1 if fields marked ‘requried’ is blank, the verification process will complain nothing.
2 if I remove ‘on’=>‘register’, the the verification works.
I am using yii_1.1.10. Any idea is welcome!
I found out the problem, I should define the senario like this in controller:
$model->scenario = 'register';
I didn’t define this before, and it worked…