PropertyComparisonValidator with nullable property

Topics: Validation Application Block
Sep 17, 2008 at 10:22 AM

I have 2 properties:

ExpiryDate (nullable) and AvailabilityDate

The attribute

[PropertyComparisonValidator("ExpiryDate", ComparisonOperator.LesserThan, Ruleset = "RuleSetCoherentValues"]

works but when ExpiryDate is null the test fails... is there any way to ignore nulls (treat them as the greatest/lowest possible value)?