Validator.ValidateProperty(Object, ValidationContext) Validator.ValidateProperty(Object, ValidationContext) Validator.ValidateProperty(Object, ValidationContext) Method

Definition

Validates the property.

public:
 static void ValidateProperty(System::Object ^ value, System::ComponentModel::DataAnnotations::ValidationContext ^ validationContext);
public static void ValidateProperty (object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext);
static member ValidateProperty : obj * System.ComponentModel.DataAnnotations.ValidationContext -> unit

Parameters

value
Object Object Object

The value to validate.

validationContext
ValidationContext ValidationContext ValidationContext

The context that describes the property to validate.

Exceptions

value cannot be assigned to the property.

The value parameter is not valid.

Remarks

This method tests each ValidationAttribute instance that is associated with the property identified by the validationContext parameter.

Applies to