Skip to content

Instantly share code, notes, and snippets.

@StevePotter
Created December 20, 2012 19:14
Show Gist options
  • Save StevePotter/4347860 to your computer and use it in GitHub Desktop.
Save StevePotter/4347860 to your computer and use it in GitHub Desktop.
jquery validator global settings for twitter bootstrap horizontal forms
$.validator.setDefaults({
highlight: function(label) {
return $(label).closest(".control-group").addClass("error");
},
success: function(label) {
return label.hide().closest(".control-group").removeClass("error");
},
errorClass: "help-inline",
validClass: ""
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment