filmov
tv
How to get modelstate errors using json in MVC c#?
Показать описание
In this tutorial I am going show you how to handle modelstate errors in json c#. Here I am using MVC5 and entity framework.You can use SelectMany function c# to get error message from modelstate mvc. It will generate error message string it contains modelstate errors; we can return as json and display in html element.
You have to define validations inside the class as per requirement. Here I have written for password match and minimum character required.
share, support, subscribe
by infinetsoft