You are right. CUniqueValidator can not be performed with a simple client side script, because it has to access the db to check if the input value is unique in the table.
So, we have to use ajax.
And CActiveForm supports ajax validation for all the validators.
Couldn’t we enable both AjaxValidation and ClientValidation at the same time?
@softark yes it works. Of course, one has also to enable Ajax validation in the controller action
$this->performAjaxValidation($model);
Both [font=“Courier New”]enableAjaxValidation[/font] and [font=“Courier New”]enableClientValidation[/font] can be set to true in the view if we want to benefit from client validation first, then ajax validation (if a field fails to validate on the client side, it’s not re-validated on server-side afaik).