$("#form1").validate({ highlight: function (element) { $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); }, unhighlight: function (element) { $(element).closest('.form-group').removeClass('has-error').addClass('has-success'); }, errorElement: 'span', errorClass: 'help-block', onsubmit: false, errorPlacement: function (error, element) { if (element.parent('.input-group').length) { error.insertAfter(element.parent()); } else { error.insertAfter(element); } } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)