.Net Asp.Net MVC

Show all modestate errors

foreach (var modelState in ModelState.Values)
                {
                    foreach (var error in modelState.Errors)
                    {
                        ModelState.AddModelError("", error.ErrorMessage);
                    }
                }

Leave a Reply

Your email address will not be published. Required fields are marked *