Friday 15 April 2016

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:
?
1
2
3
4
5
6
7
8
9
$form=$this->beginWidget(
    'CActiveForm',
    array(
        'id'=>'member-form',
        'enableAjaxValidation'=>false,
        'enableClientValidation'=>true,
        'clientOptions' => array('validateOnSubmit'=>true),
    )
);

No comments:

Post a Comment

Setup VueJS in Laravel

Setup VueJS in Laravel 1. You will need to install javascript dependencies by running the following command on your terminal.      npm i...