var keys = from m in ModelState where m.Value.Errors.Any() select m.Key;
var errors = ModelState.Values.SelectMany(v => v.Errors);
Last updated 3 years ago