As a corollary to this question, how would I configure jQuery Validate to validate some hidden fields in a form, but not all of them?
jQuery Validate ignores hidden fields by default, which is sort of an issue in ASP.NET projects. For instance, a page might have a form with both checkbox helpers (which generate hidden inputs
), as well as custom dropdowns which may utilize many hidden inputs.
$(document).ready(function() {
$('#myform').validate({
ignore: [],
// any other options and/or rules
});
});
Using the config object like so, is there any way that I can set this up to allow me to pick and choose which specific hidden inputs to validate, without having to specify every individual input the plugin has to ignore?
Alternatively, is there a validation event hook that I could leverage in this scenario?