Yii Ajax Validation

Hello,

I would like to combine client and ajax validation on my Sign Up form. Specifically, I only want the ajax validation fires up when changes are made to email field to check for uniqueness. The rest of sign up fields can be done by client validation. The problem is every time I change/tab from field to field, ajax validation is fired up. Is it possible to enforce ajax validation on email field only ?

Thank you,

You have to add a parameter to the error function of the fields you don’t want to fire ajax validation.

I guess it’s now something like:


$form->error($model, 'attribute');

Try to change it to:


$form->error($model, 'attribute', array(), false);

Api reference