O'Reilly logo
  • Ryan Garrett thinks this is interesting:

Just displaying the form when there is an error is not helpful—I also need to provide the user with some indication of what the problem is and why I could not accept their form submission. I do this by using the Html.ValidationSummary helper method in the RsvpForm view, as shown in Listing 2-18.


Cover of Pro ASP.NET MVC 5, Fifth Edition


Html.ValidationSummary spits out all of the validation errors