How do I validate some hidden fields and not others?
jquery, unobtrusive-validation
Solution
You can add a class(like `validate`) to those hidden fields which has to be validated then
validator.settings.ignore = ":hidden:not(.validate)";
Problem
I am using jQuery unobtrusive validation on a form. Some fields are hidden, and some of these hidden fields require validation and others do not. I understand in order to validate hidden fields I can do this: ``` var validator = $("form").data("validator"); validator.settings.ignore = ""; ``` But this then validates all hidden fields. How do I specify which hidden fields should be validated?