0

I would like to validate one particular hidden field (which is a counter) on a form.

As the other hidden fields should not be validated, the classic workaround below does not fit to my needs.

$.validator.setDefaults({ 
    ignore: [],
});

Do you know a solution for this issue?

b126
  • 544
  • 4
  • 11
  • 1
    `ignore: []` means to ignore "nothing". If you want to ignore everything except a certain field then you need to change the parameter into something more appropriate for your situation. Since you have not shown any of the relevant HTML markup, I'm not sure how anybody is going to know how to answer this for you, however, if you click on [the duplicate](https://stackoverflow.com/questions/20287567/ignore-all-hidden-div-but-not-one-in-jquery-validation), you will get the right idea. – Sparky Jun 30 '19 at 13:55
  • You also should avoid tag-spamming. The jQuery Validate plugin and the jQuery Validation Engine are not the same plugin. Edited. – Sparky Jun 30 '19 at 13:55
  • 1
    Thank you @Sparky. The duplicate solved it perfectly. – b126 Jun 30 '19 at 14:20

0 Answers0