php - Yii Multiple Scenario based client validations -


I am creating a form using Yii's activeForm.

The client-side legalization does not take care of the scenarios that are working in all aspects of the form.

I like it if I can do client verification work on the basis of scenarios.

Partial code for the form below

  $ form = $ this- & gt; StartWidget ('CActiveForm', array ('enableClientValidation' = & gt; true, 'enabled agenda validation' = & gt; wrong, 'errormessage class' = & gt; 'is-error', 'htmlOptions' = & gt; array ('Class' = & gt; 'form-horizontal', 'roles' = & gt; form, 'id' = & gt; 'payment-form',), 'client option' = & gt; array 'Id' = & gt; 'payment-form', 'validonomimit' = & gt; true, 'error is cs class' = & gt; 'is-error', 'success css class' => Success', 'InputContainer' = & gt; '.form-group', 'validateOnChange' = & gt; true,),);  

FYI scenario is verified when the data is pushed to the model We have defined scenarios for verification so if you want to validate on behalf of the client, the only way to use "Javascript", or through AJAX, which you have closed is ajax verification ' EnableAjaxValidation '= & gt; True, to get client verification using AJAX.


Comments