-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client side yiiActiveForm('validate') #6160
Comments
+1 |
also is there a way to be able to do single attributes validations using js? I am trying to make a form with this http://vadimg.com/twitter-bootstrap-wizard-example/ right now i am stuck that I need to trigger js validation of the fields when I switch steps which as @leandrogehlen said, is only possible when the form is submitted. |
@Faryshta yes. $('form').yiiActiveForm('validateAttribute', 'contactform-name')`. |
$('#contact-form').data('yiiActiveForm').submitting = true;
$('#contact-form').yiiActiveForm('validate'); |
@samdark how can I know if validation manually triggered returns errors? I'm developing a wizard in which a form is divided in steps and every time the "next" button is clicked I need to trigger validation and change step only if no validation errors occurs.
I can't control validation result. |
@cyanoboy i am doing the same. Chofoteddy/yii2-bootstrap-wizard#4 |
Currently does not possible to invoke the method
validate
unless when i will submitting the form.Ex:
The text was updated successfully, but these errors were encountered: