System.ComponentModel.DataAnnotations Extends the metadata information for a class by adding attributes and property information that is defined in an associated class. Initializes a new instance of the class by using the specified type. The type for which the metadata provider is created. Initializes a new instance of the class by using the specified metadata provider type and associated type. The type for which the metadata provider is created. The associated type that contains the metadata. The value of is null. Gets a type descriptor for the specified type and object. The descriptor that provides metadata for the type. The type of object to retrieve the type descriptor for. An instance of the type. Represents an enumeration of the data types associated with data fields and parameters. Represents a custom data type. Represents an instant in time, expressed as a date and time of day. Represents a date value. Represents a time value. Represents a continuous time during which an object exists. Represents a phone number value. Represents a currency value. Represents text that is displayed. Represents an HTML file. Represents multi-line text. Represents an e-mail address. Represent a password value. Represents a URL value. Specifies the name of an additional type to associate with a data field. Initializes a new instance of the class by using the specified type name. The name of the type to associate with the data field. Initializes a new instance of the class by using the specified field template name. The name of the custom field template to associate with the data field. is null or an empty string (""). Gets the name of custom field template that is associated with the data field. The name of the custom field template that is associated with the data field. Gets the type that is associated with the data field. One of the values. Gets a data-field display format. The data-field display format. Returns the name of the type that is associated with the data field. The name of the type that is associated with the data field. Checks that the value of the data field is valid. true always. The data field value to validate. Specifies the column that is displayed in the referred table as a foreign-key column. Initializes a new instance of the class by using the specified column. The name of the column to use as the display column. Initializes a new instance of the class by using the specified display and sort columns. The name of the column to use as the display column. The name of the column to use for sorting. Initializes a new instance of the class by using the specified display column, and the specified sort column and sort order. The name of the column to use as the display column. The name of the column to use for sorting. true to sort in descending order; otherwise, false. The default is false. Gets the name of the column to use as the display field. The name of the display column. Gets the name of the column to use for sorting. The name of the sort column. Gets a value that indicates whether to sort in descending or ascending order. true if the column will be sorted in descending order; otherwise, false. Specifies how data fields are displayed and formatted by ASP.NET Dynamic Data. Initializes a new instance of the class. Gets or sets a value that indicates whether the formatting string that is specified by the property is applied to the field value when the data field is in edit mode. true if the formatting string applies to the field value in edit mode; otherwise, false. The default is false. Gets or sets a value that indicates whether empty string values ("") are automatically converted to null when the data field is updated in the data source. true if empty string values are automatically converted to null; otherwise, false. The default is true. Gets or sets the display format for the field value. A formatting string that specifies the display format for the value of the data field. The default is an empty string (""), which indicates that no special formatting is applied to the field value. Gets or sets the text that is displayed for a field when the field's value is null. The text that is displayed for a field when the field's value is null. The default is an empty string (""), which indicates that this property is not set. Specifies the metadata class to associate with a data model class. Initializes a new instance of the class. The metadata class to reference. is null. Gets the metadata class that is associated with a data-model partial class. The type value that represents the metadata class. Specifies the numeric range constraints for the value of a data field in Dynamic Data. Initializes a new instance of the class by using the specified minimum and maximum values. Specifies the minimum value allowed for the data field value. Specifies the maximum value allowed for the data field value. Initializes a new instance of the class by using the specified minimum and maximum values. Specifies the minimum value allowed for the data field value. Specifies the maximum value allowed for the data field value. Initializes a new instance of the class by using the specified minimum and maximum values and the specific type. Specifies the type of the object to test. Specifies the minimum value allowed for the data field value. Specifies the maximum value allowed for the data field value. is null. Formats the error message that is displayed when range validation fails. The formatted error message. The name of the field that caused the validation failure. Checks that the value of the data field is in the specified range. true if the specified value is in the range; otherwise, false. The data field value to validate. The data field value was outside the allowed range. Gets the maximum allowed field value. The maximum value that is allowed for the data field. Gets the minimum allowed field value. Gets the type of the data field whose value must be validated. The type of the data field whose value must be validated. Specifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression. Initializes a new instance of the class. The regular expression that is used to validate the data field value. is null. Formats the error message to display if the regular expression validation fails. The formatted error message. The name of the field that caused the validation failure. Checks whether the value entered by the user matches the regular expression pattern. true if validation is successful; otherwise, false. The data field value to validate. The data field value did not match the regular expression pattern. Gets the regular expression pattern. The pattern to match. Specifies that a data field value is required. Initializes a new instance of the class. Checks that the value of the required data field is not empty. true if validation is successful; otherwise, false. The data field value to validate. The data field value was null. Specifies whether a column is exposed by the scaffolding mechanism. Initializes a new instance of using the property. The value that specifies whether scaffolding is enabled. Gets or sets the value that specifies whether scaffolding is enabled. true, if scaffolding is enabled; otherwise false. Specifies whether a class or data table uses scaffolding. Initializes a new instance of using the property. The value that specifies whether scaffolding is enabled. Gets or sets the value that specifies whether scaffolding is enabled. true, if scaffolding is enabled; otherwise false. Specifies the maximum length of characters that are allowed in a data field. Initializes a new instance of the class using a specified maximum length. The maximum length of a string. is negative. Applies formatting to a specified error message. The formatted error message. The error message to format. Determines whether a specified object is valid. true if the specified object is valid; otherwise, false. The object to validate. Gets or sets the maximum length of a string. The maximum length of the input string. Specifies the template or user-defined control Dynamic Data uses to display a data field. Initializes a new instance of the class by using a specified user-defined control name. Specifies the user control to use to display the data field. Initializes a new instance of the class using the and properties. The user control to use to display the data field. The presentation layer that uses the class. Can be set to HTML, Silverlight, WPF, or WinForms. Initializes a new instance of the class using the and and the properties. The user control to use to display the data field. The presentation layer that uses the class. Can be set to HTML, Silverlight, WPF, or WinForms. The object to use to retrieve values from any data sources. is null, or if it is a constraint key, or if the value of is not string. Gets or sets the object to use to retrieve values from any data source. A collection of key-and-value pairs. Gets or sets the presentation layer that uses the class. The presentation layer that used this class. Gets or sets the name of the field template to use to display the data field. The name of the field template that displays the data field. Base class for all validation attributes. If and are set at the same time as . Initializes a new instance of the class. Initializes a new instance of the class using the function that enables access to validation resources. The function that enables access of validation resources. is null. Initializes a new instance of class using the error message to associate with a validation control. The error message to associate with a validation control if a validation fails. Gets or sets an error message to associate with a validation control if a validation fails. The error message associated with the validation control. If a is already in resource mode or if you try to reset this property multiple times. If the value of the error message is an empty string or null. Gets or sets the error message resource name to use as lookup for the if a validation fails. The error message resource associated with a validation control. If the is already in explicit mode or if you set the property multiple times. If the value of error message is null. Gets or sets the resource type to use for error message lookup if a validation fails. The type of error message associated with a validation control. If you try to set an error message or multiple times. If the is null or an empty string. Gets the error message to associate with a validation control when a validation fails. The error message to display when a validation fails. The resource accessors used to retrieve an error message fails. Requires both and Applies formatting to an error message based on the data field where the error occurred. An instance of the formatted error message. The name of the data field where the error occurred. Determines whether the specified value of the object is valid. true if the specified value is valid; otherwise, false. The value of the specified validation object on which the is declared. Validates an object or property on which the is declared. The value of the object on which a is declared. The name of the object or data field on which a is declared. is not valid. Represents the exception that occurs during validation of a data field when the class is used. Initializes a new instance of the class using an error message generated by the system. Initializes a new instance of the class using serialized data. The object that holds the serialized data. Context information about the source or destination of the serialized object. Initializes a new instance of the class using a specified error message. A specified message that describes the error. Initializes a new instance of the class using a specified error message, a validation attribute, and the value of the current exception. The message that describes the error. The attribute that caused the current exception. The value of the object that caused the attribute to trigger validation error. Initializes a new instance of the class using a specified error message and a collection of inner exception instances. The error message. The collection of validation exceptions. Gets information about the exception and adds it to the object The object that holds the serialized object data for the exception that occurred. Context information about the source or destination of the exception. Gets or sets the instance of the class that triggered this exception. An instance of the validation attribute type that triggered this exception. Gets or set the value of the object that causes the class to trigger this exception. The value of the object that caused the class to trigger the validation error.