Data Annotation - .NET Framework

The following attributes require the System.ComponentModel or System.ComponentModel.DataAnnotations namespaces.

AttributeDescription
DisplayName("label")Designates the text to be displayed via the Html.LabelFor helper
Range(min, max)Specifies a valid range of values for the field
RequiredMarks a field as required a non-null, non-zero-length value
StringLength(maxLength)Specifies the maximum allowable length for a string field