Hi,
I am using capcha only one of my action. That a reason I add the validator into beforeValidation. The problem is validation always return "Verify Cod is incorrect" error message
Any idea. Thanks
public function beforeValidate() {
if(Yii::app()->controller->action->id=='forgetPassword'){
$validator = new CCaptchaValidator();
$validator->caseSensitive=false;
$validator->captchaAction='captcha';
$validator->allowEmpty=false;
$validator->attributes = array('verifyCode');
$validator->skipOnError=false;
//$validator->on=array('create'=>'create');
$this->validatorList->add($validator);
}
return parent::beforeValidate();
}