Search code examples
twitter-bootstrapasp.net-mvc-4razorunobtrusive-validation

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?


Solution

  • 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