I have a form name="myform" but there is exists hidden fields So i want to validate those fields also, how to validate hidden fields using jquery form validation?
Asked
Active
Viewed 321 times
-3
-
please provide such with some codes – bipen Feb 27 '13 at 05:52
-
1this might help http://stackoverflow.com/questions/8466643/jquery-validate-enable-validation-for-hidden-fields – PSR Feb 27 '13 at 05:53
-
which jQuery validation plugin are you using now ? – Feb 27 '13 at 05:53
2 Answers
0
You can use jQuery.validate
plugin that allow to validate hidden fields.
Just set ignore : false;
or $.validator.setDefaults({ ignore: '' });
and that will allow you to validate hidden fields.
Official Site : http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Devang Rathod
- 6,650
- 2
- 23
- 32
-
As per developer, `ignore: []` is the proper syntax. See: http://stackoverflow.com/a/8565769/594235 – Sparky Feb 27 '13 at 16:28
0
override the ignore variable and set it to empty:
$("#form").validate({
ignore: "",
rules: {
something: {
number:true,
}
}
});

Rahul Chipad
- 2,373
- 17
- 20
-
As per developer, `ignore: []` is the proper syntax. See: http://stackoverflow.com/a/8565769/594235 – Sparky Feb 27 '13 at 16:28