I am using jQuery Validation plugin on my pages
When the field first has jquery error it displays as the following:
<label for="fromDate" generated="true" class="error" style="">This field is required.</label>
when I correct a validated error it adds the following CSS style to the element.
display: none
The issue is though when I make the element have an error again it changes the CSS style to the following
display: block
How can I make it just remove the CSS style instead of switching it to block?
Since
display:blockis the normal default state of this element, it is functionally identical to removingdisplay:none. In other words, even if you could do what you want, the browser still sees it asdisplay:block… no difference. What exactly is the real issue here?To control where the error is placed, search for
errorPlacementoption on this page in the documentation. Although, you’ll probably have the same issue, whatever it is.This shows the
errorPlacement:option with the defaultfunction.