Server-Side Validation in ASP.NET MVC

In this article, we’ll explain the basics of ASP.NET MVC server-side validation using the Data Annotation API. The ASP.NET MVC framework will validate any data passed into the controller action that it is executing. It will populate the ModelState object with any validation failure that it can find then pass the object to the controller.

This tutorial will use two approaches to validate a model date. One is manually adding an error to the ModelState, the other is to use Data Annotation API to validate the model data.

Read the rest of the post here:


Leave a Reply

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