Reputation: 68680
I am using jQuery validation plugin for form validation. The problem I am facing is when I have inline labels..
For Example:
<input type="text" name="myinput" value="Enter your ....">
This is the sample case where validation is failing because the 'value' is set for input field. Is there any workaround? How do I ignore default/label values?
Upvotes: 0
Views: 171
Reputation: 65264
I think you should make/add a method for that..
jQuery.validator.addMethod("exception", function(value, element) {
return this.optional(element) || value == "Enter your ....";
}, "message if bad");
then use exception : true
...
more on addMethod()
Upvotes: 1