How do I get the collection of errors in a view?
I don\'t want to use the Html Helper Validation Summary or Validation Message. Instead I want to check for errors an
Got this from BrockAllen's answer that worked for me, it displays the keys that have errors:
var errors = from item in ModelState where item.Value.Errors.Count > 0 select item.Key; var keys = errors.ToArray();
Source: https://forums.asp.net/t/1805163.aspx?Get+the+Key+value+of+the+Model+error