How can I integrate ASP.NET MVC unobtrusive validation and Twitter Bootstrap? I want to have all those validation messages and styles appropria
This will convert ValidationSummary()
to a boostrap alert. You can include a little script to remove unnecessary classes and give a highlight to fields with problems.
@if (ViewData.ModelState.Any(x => x.Value.Errors.Any())) {
×
Validation Errors
@Html.ValidationSummary()
}
See more information at http://chadkuehn.com/convert-razor-validation-summary-into-bootstrap-alert/