CompareAttribute::IsValid Method (Object^, ValidationContext^)

.NET Framework (current version)
 

Determines whether a specified object is valid.

Namespace:   System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

protected:
virtual ValidationResult^ IsValid(
	Object^ value,
	ValidationContext^ validationContext
) override

Parameters

value
Type: System::Object^

The object to validate.

validationContext
Type: System.ComponentModel.DataAnnotations::ValidationContext^

An object that contains information about the validation request.

Return Value

Type: System.ComponentModel.DataAnnotations::ValidationResult^

true if value is valid; otherwise, false.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.5
Return to top
Show: