I am working on a project with Asp.Net MVC3
In a View I have @Html.ValidationSummary(true) and as usually it produces
Building upon flos's answer, I made it compatible with Microsoft's jQuery Unobtrusive Validation and added Bootstrap's 3 panel styling. Here's the new code:
@model ModelStateDictionary
Please, correct the following errors:
@foreach(var modelError in Model.SelectMany(keyValuePair => keyValuePair.Value.Errors))
{
- @modelError.ErrorMessage
}
You can read about it in full detail here:
Creating a custom ASP.NET MVC @Html.ValidationSummary styled with Bootstrap 3 panel
I also created a sample ASP.NET MVC project to show this custom ValidationSummary in action. Get it here:
https://github.com/leniel/AspNetMvcCustomHtmlValidationSummary