YII Client side form validation error doesn’t prevent form submit

YII Client side form validation error doesn’t prevent form submit


To get this behavior you just need to add ‘clientOptions’ => array(‘validateOnSubmit’=>true), to your configuration so it would look like this:

$form=$this->beginWidget(
'CActiveForm',
array(
'id'=>'member-form',
'enableAjaxValidation'=>false,
'enableClientValidation'=>true,
'clientOptions' => array('validateOnSubmit'=>true),
)
);

Leave a comment

Your email address will not be published. Required fields are marked *