is it possible to ignore the validation of specific fields when using the ‘clientValidation’ => true
in CActiveForm? For example, i have got a model with 13 columns, from which in only want
the first 10 to be client-validated?
specific lines for the ignored columns - but is there a more elegant way?
thanks in advance
I guess just setting ‘enableClientValidation’ to false in the validation rules will do.
public function rules()
array('school_year, disp_order, name, enrolled', 'required'),
array('school_year', 'date', 'format'=>'yyyy'),
array('disp_order', 'numerical', 'integerOnly'=>true),
array('name', 'length', 'max'=>20, 'enableClientValidation' => false), // look here
Thanks! Thats it! Could have had that idea for myself…