.valid() only validates first input with jQuery Validation plugin -
I'm having difficulty getting the jQuery validation plugin to work as necessary. Please take me with me because I I'm not a Juke specialist :)
I have a form with all the necessary input, the rule is as shown below:
$ ("# MakeEvent"). Validate ({onfocusout: false, rule: {name: {required: true, minlanta: 2, max length: 100}, host: {required: true, minaltata: 2, maximum length: 100}, start date: {required : Required: incorrect, url: true}, email: true, date: right}, end date: {required: true, date: true}, desc: {required: right, minlanta: 10, max length: 255} , Webpage: {required: truth, email: true},}});
Now I have a custom. Click () to call where I want to validate the form and then show a preview before allowing the user to send the form. Please see the functions given below:
$ ('# submitPreview'). Valid () === incorrect) (if validity fails) and if ($ ("$ makeEvent"). Valid () = (if ($ ("$ makeEvent"). == true) {// Show the preview and either make the user change or submit the final result}});
But what happens is that the function only validates the first input (name) and incorrectly validates it (the rules require at least 2 characters, even if it only requires Valid with 1 character. It only returns false if no character is added).
Maybe my attitude is not the best, so I'm open to any suggestions. If you want to take a look at the dirty source code, then you can see the action in action here:
Thank you!
I can see that there are two problems that you can call name Are not using the attribute and you are using the
name
id (due to all kinds of misery for IE on the form).
I suggest changing the name, to my input, name, and texture elements to add name attributes and do something like "appointed":
Comments
Post a Comment