using System;
using System.ComponentModel.DataAnnotations;

namespace MileageTraker.Web.Attributes
{
	public class DenyFutureDateAttribute : ValidationAttribute
	{
		public override bool IsValid(object value)
		{
			var date = DateTime.Parse(value.ToString());
			return date.Date <= DateTime.Today;
		}
	}
}