I want my errors to float above, left-justified, the input field that doesn\'t validate. How can I do this?
If I can\'t, how can I turn the errors off? I still want th
Use the errorPlacement property for your jQuery validation call, as J Cooper suggested:
$(...).validate({
errorPlacement: function(error, element) {
error.insertBefore(element);
}
});
And CSS to style the error (in your stylesheet, or to the individual elements):
label.error {
/* Move the error above the input element. */
position: absolute;
line-height: 1.5em;
margin-top: -1.5em;
background-color: red;
color: white;
padding: 0 2px;
}
You want the errorPlacement option, and perhaps errorContainer and errorElement for further customization.
See http://docs.jquery.com/Plugins/Validation/validate#toptions