System.ComponentModel.DataAnnotations 4.0.0.0 System.ComponentModel.DataAnnotations.ValidationAttribute System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.All, AllowMultiple=false)

When you apply this attribute to a data field, you must follow the guidelines for how to use validation attributes. For more information, see ASP.NET Dynamic Data Guidelines.

Specifies the numeric range constraints for the value of a data field.

- Constructor
  4.0.0.0
  To be added.

  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.
- Constructor
  4.0.0.0
  To be added.

  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.
- Constructor
  4.0.0.0

  The object to validate must implement the interface.

  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.
- Method
  4.0.0.0
  System.String ``

  The creates the error message by using the name of the data field that caused the validation failure. You can override this method in a custom validation attribute to customize how errors are created, or to provide a more complex message that contains parameters that you evaluate at run time. For an example, see the constructor.

  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.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  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.
- Property
  4.0.0.0
  System.Object To be added. To be added.

  Gets the maximum allowed field value.

- Property
  4.0.0.0
  System.Object To be added.

  The minimum value that is allowed for the data field.

  Gets the minimum allowed field value.

- Property
  4.0.0.0
  System.Type To be added.

  The object to be tested must implement the interface.

  Gets the type of the data field whose value must be validated.