Admin import functional
This commit is contained in:
@@ -7,7 +7,9 @@ namespace MileageTraker.Web.Attributes
|
||||
{
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
var date = DateTime.Parse(value.ToString());
|
||||
DateTime date;
|
||||
if(value == null || !DateTime.TryParse(value.ToString(), out date))
|
||||
return false;
|
||||
return date.Date <= DateTime.Today;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user