How can I remove all default styling from error message?
I need this document structure:
<div class="error">
<p>error message</p>
</div>
I’m using this javascript
errorElement: "p",
wrapper: "div", // a wrapper around the error message
errorPlacement: function(error, element) {
error.insertAfter(element)
error.addClass('error'); // add a class to the wrapper
But getting
<div class="error">
<p class="error">error message</p>
</div>
It also adds error class to input, which I don’t need,
How can I remove error class from paragraph and input?
thanks
1 Answer