MVC4 Validation with razor and twitter bootstrap
I need to validate my input in MVC4 razor. The problem is, I want to use twitter bootstrap and then set the error message class for the top div as seen here: http://getbootstrap.com/css/#forms-control-states How can I change the parent div 's class? Have you tried this script? http://blog.ijasoneverett.com/2013/05/asp-net-mvc-validation-with-twitters-bootstrap/ I use something similar for getting bootstrap and mvc validation to play nice The accepted answer needed modifications to work with Bootstrap 3. I have used the following with success with MVC 4 and Bootstrap 3. $(function () { // any