I am using jquery and jquery.validate.cs (jQuery Validation Plugin 1.8.0) to validate a form. Right now it displays a message next to a field saying : “This is a required field”.
I also want each field to turn red color. How would i do that? Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Without any custom configuration, you can just do this:
errorvalid.These classes are also applied to the error label, so be aware of that when writing your CSS.
The validation plugin allows you to configure these class names, so you may do something like this:
The configuration options can be found at http://docs.jquery.com/Plugins/Validation/validate