When I do field validation in Asp.Net MVC, it’s generated the following error css classes :
- input-validation-error
- field-validation-error
Is there a way that I can change the names of the error classes that are generated?
I use xVal.
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.
I don’t know about xVal but as far as the ASP.NET MVC side of things go, if you have a look at the source you’ll see there are some static readonly strings that represent these values.
So either you edit the source to your liking (which may also fix xVal) or alter the outputting code to use different values somehow.
If xVal is using jQuery Validation (which I think it does…?) you could change it’s default value for the ‘errorClass’ option. My answer here could help you along that path.
HTHs,
Charles