Link
$form = $this->beginWidget('CActiveForm',array(
'id'=>'pass-form',
'enableAjaxValidation'=>true,
'clientOptions' => array(
'validateOnSubmit'=>true,
//'validationDelay'=>5000,
'focus'=>'input[type="password"]:first',
'afterValidateAttribute' => 'js:function(form, attribute, data, hasError) {
if (attribute.name == "newPass_repeat") {
var settings = $.fn.yiiactiveform.getSettings(form);
successCallback = function (messages) {
$.each(settings.attributes, function () {
if (this.name == "newPass") {
$.fn.yiiactiveform.updateInput(this, messages, form);
}
});
};
$.each(settings.attributes, function () {
if (this.name == "newPass") {
this.status = 2;
}
});
$.fn.yiiactiveform.validate ("#pass-form", successCallback);
}
}'
)
));