I have the following code using jQuery Validate.
$("#register").validate({
debug: true,
errorClass:'error',
validClass:'success',
errorElement:'span',
highlight: function (element, errorClass, validClass) {
$(element).parents("div.control-group")
.addClass(errorClass)
.removeClass(validClass);
},
unhighlight: function (element, errorClass, validClass) {
$(element).parents(".error")
.removeClass(errorClass)
.addClass(validClass);
}
});
Is there a way to add a class to the errorElement, 'span' so that it's...:
<span class="help-inline error">Message</span>