You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.
can anyone tell me how the multipage form can be validated ie prevent the user from going to the next page or submitting the form if fields are not valid?
i've downloaded jquery validate and followed instructions here:
i have managed to get validation working 'onblur' but you have to click in the field first.
the problem is it is still possible to navigate through all the pages and click submit.
i would like to prevent the user from moving forward if the page does not validate.
here is head code:
<scripttype="text/javascript" src="http://path.to/jquery-1.7.1.min.js"></script><scripttype="text/javascript" src="http://path.to/jquery.validate.min.js"></script><!-- validation --><scripttype="text/javascript">$(document).ready(function(){$('#multipage').validate({onfocusout: function(element){jQuery(element).valid();},// enables onblur validationrules: {name: {minlength: 2,required: true},email: {required: true,email: true},message: {minlength: 2,required: true},message_2: {minlength: 2,required: true}},messages: {name: "please enter your name",email: {required: "please enter your email",email: "please enter a valid email"},message: "please enter your message",message_2: "please enter your second message"},highlight: function(label){$(label).closest('.control-group').addClass('error');},success: function(label){label.text('OK!').addClass('valid').closest('.control-group').addClass('success');}});});</script>
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hello,
can anyone tell me how the multipage form can be validated ie prevent the user from going to the next page or submitting the form if fields are not valid?
i've downloaded jquery validate and followed instructions here:
http://alittlecode.com/files/jQuery-Validate-Demo/
i have managed to get validation working 'onblur' but you have to click in the field first.
the problem is it is still possible to navigate through all the pages and click submit.
i would like to prevent the user from moving forward if the page does not validate.
here is head code:
The text was updated successfully, but these errors were encountered: