我正在使用WCF RIA服务。我面临DateTime字段需要RangeAttribute。 RangeAttribute是否支持DateTime字段?或者我是否需要应用自己的CustomAttribute?
答案 0 :(得分:1)
我找到了答案。可以像这样使用DateTime的Range属性:
[Range(typeof(DateTime), "1-Jan-1910", "1-Jan-2060", ErrorMessage = "Неверный формат даты")]
public virtual System.DateTime IssueDate