I have a textfield that needs validation and is placed next to the submit button as if to form one unique element visually. Something like this:
___________________________
| | |\ |
|______________________|_|/_|
^text part here ^badly drawn arrow here (submit button)
now, if the password is not valid (less than 5 characters) I’ve set up the script to make the textfields border red. What I also need though due to this design is to add a class to the submit button too so I can make it’s border red also.
Any clues on how should I go about doing that?
EDIT: Or if there is a way to add a class to an ancestor element instead so I can go higher and include the submit button as well.
did it using the highlight and unhighlight properties.
http://docs.jquery.com/Plugins/Validation/validate