admin管理员组文章数量:1391995
I am using smartWizard (can be found here ) and now want to validate the form using jQuery validate plugin (can be found here / or here /)
I tried
$('#wizard').smartWizard({
onFinish: function() {
$("form").validate();
}
});
but no working !
I am using .validate() only because i passed the rules in HTML attributes!
I am using smartWizard (can be found here http://techlaboratory/smartwizard) and now want to validate the form using jQuery validate plugin (can be found here http://bassistance.de/jquery-plugins/jquery-plugin-validation/ or here http://jqueryvalidation/)
I tried
$('#wizard').smartWizard({
onFinish: function() {
$("form").validate();
}
});
but no working !
I am using .validate() only because i passed the rules in HTML attributes!
Share Improve this question edited Nov 1, 2016 at 10:47 Dipu Raj 1,8944 gold badges33 silver badges39 bronze badges asked Apr 5, 2014 at 10:30 AdnanAdnan 1,4092 gold badges18 silver badges24 bronze badges 02 Answers
Reset to default 3Well guys i found the answer; How we will use jQuery Validation with smartWizard? Simply submit the form on "onFinish" call back of smartWizard, put .validate(); in the page where ever you want. Validation plugin executes on the form submission, smartWizard does not submit the form. It actually tell you that user is at the last step of wizard and just clicked the Finish button.
$('#wizard').smartWizard({
onFinish: function() {
$("form").submit();
}
});
$("form").validate({
rules: {
username: "required"
}
});
There are many ways to apply a rule in jQuery Validation, above is one of them!
Latest version (SmartWizard 4.x) have an implementation with jQuery validator plugin. Check this demo Smart Wizard: Demo Input Validation
Also see jQuery Smart Wizard v6 Form Validation Demo
本文标签: javascriptsmartWizard and jQuery validateStack Overflow
版权声明:本文标题:javascript - smartWizard and jQuery validate - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744676538a2619146.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论