How to know if the validation has been triggered in yii2 active form? I am using
$('#formId').yiiActiveForm('validate', true);
to validate the form, but it always returns undefined.
How to know if the validation has been triggered in yii2 active form? I am using
$('#formId').yiiActiveForm('validate', true);
to validate the form, but it always returns undefined.
Trigger the form validation try this :
I've create a function to validating active form in javascript, it will be return true/false. Maybe usefull :
call it :
Try
in your MODEL
For example,
first_name like input name in your view file
In your VIEW files