This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Web.Mvc; | |
// Use in views by calling `@Html.CunningValidationSummary(...)` instead of `@Html.ValidationSummary(...)` | |
// It will give an attribute of `data-valmsg-source` on each list item in the validation summary with a value of the prop the error relates to. | |
// Then you can use js to scroll to the field in question. | |
// |