Skip to content

Instantly share code, notes, and snippets.

@06b
Created October 18, 2012 19:40
Show Gist options
  • Save 06b/3914337 to your computer and use it in GitHub Desktop.
Save 06b/3914337 to your computer and use it in GitHub Desktop.
Override the jQuery validation settings in ASP.NET MVC 3 to validate hidden input elements
<script>
$(document).ready(function () {
$(function () {
var settings = $.data($(‘form’)[0], ‘validator’).settings;
settings.ignore = “”
settings.onkeyup = false;
settings.onfocusout = false;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment