ASP.NET MVC Validation add class to containing div

Viewed 5706

I'm using bootstrap CSS form styles, When a textbox gets a validation error message, I need to put the class "error" on the containg . How can I do this?

Problem is, all the validations fire on ajax before submitting the form, except for my custom validators which only fire on post. So need to make sure it happens 4 both scenarios.

http://twitter.github.com/bootstrap/base-css.html#forms

3 Answers
Related