jQuery(document).ready(function($){
$("#frm1").validate({
debug: false,
rules: {
name: "required",
email: {
required: true,
email: true
}
},
messages: {
name: "Please let us know who you are.",
email: "A valid email will help us get in touch with you.",
},
});
});
The script works fine, but I would like to change something.
I would like this:
<input type="text" name="name" />
to change into this:
<input type="text" id="name" />
But when I do this, the validation script does not work.
Is there a way to change this?
Thank you!
02-26-2012, 10:00 AM
trav5567
keep the name="name" and add the id="name as well. Is their a reason why you want to add a ID?
02-26-2012, 10:03 AM
lottevanbreugel
Thank you.
I would like the name parameter to use for an other plugin.
The other plugin, uses names like: "formandler[one]", and the jQuery script wont accept the [].