I'm using the jQuery validation plugin, and I want to add a class to the input fields that doesn't validate, i.e. add a red border.
Anyone know how to do this?
I'm using the jQuery validation plugin, and I want to add a class to the input fields that doesn't validate, i.e. add a red border.
Anyone know how to do this?
This form has the effect you want and uses the same plug-in, perhaps you could peek under the covers to see how they did it:
http://jquery.bassistance.de/validate/demo/marketo/
EDIT: I started peeking for you, but then Jon posted the answer.
The validation plugin adds the class 'error' to the input with the validation error.
Therefore you can style it independently.
For example:
.error {
border: 1px solid red;
}