Get the keys with model state errors in MVC
Get the keys with model state errors in MVC
var keys = from m in ModelState
where m.Value.Errors.Any()
select m.Key;
var errors = ModelState.Values.SelectMany(v => v.Errors);
Last updated
Was this helpful?