public ValidationResult IsValid(PropertyInfo propertyToValidate, object value)
{
if (!(value is DateTime)) throw new ArgumentException("value for NotInPastAttribute is not a DateTime");
return !(Convert.ToDateTime(value.ToString()) >= DateTime.Now)
? ValidationResult.CreateError(propertyToValidate, "Adf.Business.AttributeNotInPastInvalid", propertyToValidate.Name)
: ValidationResult.Success;
}