1

In 2011, jQuery Validate - Enable validation for hidden fields recommended solution to validate hidden fields using validation plugin http://jqueryvalidation.org/ version 1.9 was to set the ignore property to an empty array.

Using version 1.13.1, is this still the preferred way to do so?

If I only wish to validate one specific hidden input, and use the default for all other inputs, is there another way to do so? I tried adding a custom validation method, however, the hidden attribute of the input prevented it from being triggered. Maybe instead of setting the ignore attribute to an empty array, could it be set to something that ignores all hidden inputs except for the one I wish validated?

Community
  • 1
  • 1
user1032531
  • 24,767
  • 68
  • 217
  • 387
  • Yes, it still works that way. And yes, you can specify that it ignore only certain hidden inputs and not others... it's just a matter of using the proper selectors. Based on the question, I guess you have not tried anything yet. – Sparky Dec 21 '14 at 17:27
  • Also see: http://stackoverflow.com/a/20287614/594235 – Sparky Dec 21 '14 at 17:32
  • 1
    Hey Sparky, Good to see you are still helping out on this topic after several years! Thanks, I will look into selecting all but the specific element. Note that I had tried for quite a bit before posing this question. Thanks again. EDIT. Thanks for the second post. Agree it was duplicated. Sorry – user1032531 Dec 21 '14 at 17:33

0 Answers0