Loading

How to get all Errors from ASP.Net MVC modelState?

foreach (ModelState modelState in ViewData.ModelState.Values) {
    foreach (ModelError error in modelState.Errors) {
        DoSomethingWith(error);
    }
}
posted @ 2017-08-25 16:17  Dhoopu  阅读(266)  评论(0编辑  收藏  举报