are there any way to reset $.validator.setDefaults({ onfocusout: false, onkeyup: false }); in MVC3. I want to change the value in to some thing like
$.validator.setDefaults({ onfocusout: true, onkeyup: true });
after I click a button.
How to archive this?
Thanks.
are there any way to reset $.validator.setDefaults({ onfocusout: false, onkeyup: false }); in MVC3.
Share
setDefaultsshould be set before$('form').validate()is called. Oncevalidate()is called, the default are not used, so you must update the instance settings:(answer by bruce:link answer)