I am validating two dates. I am using FoolProf
to validate One date in Greater than
the other like this...
[DataType(DataType.Date)]
public System.DateTime StartDate{ get; set; }
[DataType(DataType.Date)]
[GreaterThan("StartDate")]
public System.DateTime EndDate { get; set; }
The Problem I found is that it is validating other way round.
When I set a StartDate
smaller than EndDate
, the message it appears it
StartDate can not be greatest than End Date...
And when I set a EndDate
bigger than StartDate
, no message appears.
What I am missing.?
Thanks