This is probably something simple I'm just missing from the documentation and examples, but I'm trying to remove a style from the generated label that appears when a field is invalid.
This is what I'm getting for a generated label:
<label style="display: inline;" class="error" generated="true" for="FirstName">
What I want is:
<label class="error" generated="true" for="FirstName">
The frustrating part about this for me so far is when I review the examples, I'm not seeing anything that makes me think that the display: inline style is the default behavior.
I'm not doing anything fancy with my implementation. I've added a few validation methods, and have this for the errorPlacement:
errorPlacement: function(error, element) {
error.insertAfter(element.siblings("label"));
}
EDIT:
I've discovered that this is happening only on one of my views.
I also found out that if I hard code the error labels:
<label for="FirstName" class="error" generated="false" style="display:block;"></label>
The system re-writes the style to be display:inline.
Is there something related to asp.net MVC that would be re-writing these styles like this on one of the views? Or would there be some condition that would force the jQuery validation plugin to do this?