You can validate action results too and MVC methods by passing in the model which has the data annotations as part of the parameter list
The .NET Framework provides us a set of attributes that we can use to validate objects. By using the namespace System.ComponentModel.DataAnnotations
we can annotate our model’s properties with validation attributes.
View original post 181 more words
Advertisements