i am use asp.net mvc 5, about jquery validate unobtrusive, jquery validate is 1.13 version. I have searched very much answer, Although this problem have solve,But I want to know another method.
$.validator.setDefaults({ ignore: [] }); //valid
$("#form1").data("validator").settings.ignore = []; //invalid,all input validate invalid
$("#form1").data("validator").settings.debug = true;//valid,if use this method,debug ture model is open, why?
if put code in $(document).ready. all code is useless
how Enable validation for hidden fields only for one form?
Instead of enabling the validation for all hidden fields , its better to enable validation for only the ones you want.
you can do this by assigning a class to the hidden fields you want to validate and then using the following code.
If you want to enable validation for all hidden fields , use