Data Annotation Ranges of UK Datetime fields
问题 I want to use Data Annotations to validate DateTime fields, but I'm running into problems. According to documentation on MSDN (http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.rangeattribute.aspx), the following should do the job [Range(typeof(DateTime), "1/2/2004", "3/4/2004", ErrorMessage = "Value for {0} must be between {1} and {2}")] However, this marks any date I enter as invalid! At first I thought it was not picking up UK dates (when I tried 26/2/2004) but