📅  最后修改于: 2022-03-11 15:00:35.449000             🧑  作者: Mango
foreach (ModelState modelState in ViewData.ModelState.Values) {
foreach (ModelError error in modelState.Errors) {
DoSomethingWith(error);
}
}