What are Validation Annotations?

Started by beingchinmay, 03-25-2017, 04:17:34

Previous topic - Next topic

beingchinmayTopic starter

Data annotations are attributes you can find in the "System.ComponentModel.DataAnnotations" namespace. These attributes provide server-side validation, and the framework also supports client-side validation when you use one of the attributes on a model property. You can use four attributes in the DataAnnotations namespace to cover the common validation scenarios, Required, String Length, Regular Expression and Range.


richardmsmith

In the.Net Framework The System.ComponentModel.DataAnnotations namespace provides attribute classes that are used to define metadata for ASP.NET MVC and ASP.NET data controls.