Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CompareAttribute.IsValid Method (Object, ValidationContext)

Determines whether the specified object is equal to the compared object.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
protected override ValidationResult IsValid(
	Object value,
	ValidationContext validationContext


Type: System.Object
The value of the object to compare.
Type: System.ComponentModel.DataAnnotations.ValidationContext
The validation context.

Return Value

Type: System.ComponentModel.DataAnnotations.ValidationResult
null if the value of the compared property is equal to the value parameter; otherwise, a validation result that contains the error message that indicates that the comparison failed.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.