ValidationAttribute.GetValidationResult(Object, ValidationContext) ValidationAttribute.GetValidationResult(Object, ValidationContext) ValidationAttribute.GetValidationResult(Object, ValidationContext) Method

Definition

Checks whether the specified value is valid with respect to the current validation attribute.

public:
 System::ComponentModel::DataAnnotations::ValidationResult ^ GetValidationResult(System::Object ^ value, System::ComponentModel::DataAnnotations::ValidationContext ^ validationContext);
public System.ComponentModel.DataAnnotations.ValidationResult GetValidationResult (object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext);
member this.GetValidationResult : obj * System.ComponentModel.DataAnnotations.ValidationContext -> System.ComponentModel.DataAnnotations.ValidationResult

Parameters

value
Object Object Object

The value to validate.

validationContext
ValidationContext ValidationContext ValidationContext

The context information about the validation operation.

Returns

Remarks

The GetValidationResult method checks validity without throwing an exception.

Applies to

See also