I work with jquery.validate and I search a way how not allow to validator to generate error element.
$("#smsForm").validate({
highlight: function (element) {
$(element).addClass("notvalid");
},
unhighlight: function (element) {
$(element).removeClass("notvalid");
}
});
I just want to add not valid class to input field without generate any input elements.
But validator add :
<label for="phoneNumber" generated="true" class="error">Phone</label>
for example if phone number not correct
I think that if you set the
errorElementoption passed to.validator()to anything other than"label", then the validate plugin will not generate an error element for you. For example: