Model validation in ASP.NET MVC5

System.ComponentModel.DataAnnotations namespace

System.ComponentModel.DataAnnotations  namespace provides the definition of class properties ASP.NET MVC and ASP.NET data controls.

class

AssociatedMetadataTypeTypeDescriptionProvider

By adding features and attribute information defined in association class to extend a class of metadata information.

AssociationAttribute

Named entity relationship data indicating member (e.g., foreign key relationships).

BindableTypeAttribute

Specify whether the type typically used for binding.

CompareAttribute

Providing for comparing two characteristic properties.

ConcurrencyCheckAttribute

Specify the properties involved in optimistic concurrency checks.

CreditCardAttribute

Specifies the data field values ​​is a credit card number.

CustomValidationAttribute

Specify custom attributes or authentication method for verifying the class instance.

DataTypeAttribute

Specifies the name associated with other types of data fields.

DisplayAttribute

Providing a common feature allows you to specify the type localizable strings and members of the entity partial class.

DisplayColumnAttribute

Displays the designated column in the table is referenced by the foreign key column.

DisplayFormatAttribute

ASP.NET Dynamic Data show how to specify the data fields and how to set the format of the data field.

EditableAttribute

Indicates whether the data field can be edited.

EmailAddressAttribute

A confirmation e-mail address.

EnumDataTypeAttribute

That the .NET Framework enum data can be mapped to the column.

FileExtensionsAttribute

Verify file name extension

FilterUIHintAttribute

It represents an attribute that is used to screen the behavior of the specified column.

KeyAttribute

It represents a property that uniquely identifies the entity or a plurality.

MaxLengthAttribute

Property specifies the maximum allowed length array or a string data.

MetadataTypeAttribute

Class specifies the metadata to be associated with the data model class.

MinLengthAttribute

Attribute specifies the minimum allowed length array or a string data.

PhoneAttribute

Designating data field value is the standard format of a telephone number.

RangeAttribute

Numerical data field value specify a range of constraint.

RegularExpressionAttribute

ASP.NET dynamic data field value specifies data must match the specified regular expression.

RequiredAttribute

Specifies the data field values.

ScaffoldColumnAttribute

Specified class or data columns use the base frame.

ScaffoldTableAttribute

Specifies whether the data table class or base frame.

StringLengthAttribute

Designating data field allows the minimum and maximum character length.

TimestampAttribute

The column data type is specified as the row version.

UIHintAttribute

Assigning a dynamic data to display the template or user control data field.

UrlAttribute

Provide URL validation.

ValidationAttribute

As all the properties of the base class verification.

ValidationContext

Description execution context validation checks.

ValidationException

It indicates use  ValidationAttribute  authentication data field when an abnormality occurs in the case of the class.

ValidationResult

Authentication result request indicates a container.

Validator

Define a helper class, in associated with the object, properties and methods  ValidationAttribute  when comprising such characteristics, these may be used to verify these items.

interface

IValidatableObject

Provide for a way to invalidate objects.

enumerate

DataType

It indicates the data type of the enumeration and the parameters associated with the data field.

Guess you like

Origin www.cnblogs.com/win32pro/p/11927745.html