Create a gist now

Instantly share code, notes, and snippets.

Updated for bootstrap 3 and made it more simple
$('form').submit(function () {
$('.valid').parent('div').parent('.form-group').addClass('has-success');
$('.input-validation-error').parent('div').parent('.form-group').addClass('has-error');
$('.validation-summary-errors').addClass("alert alert-danger");
$('.validation-summary-errors').find("ul").addClass("list-unstyled");
$('.validation-summary-errors').removeClass("validation-summary-errors");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment