次のようなMVC情報ファイルでプロパティを宣言しました
[Required(ErrorMessage = "End Date has not being entered")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
[RegularExpression(@"^(0[1-9]|1[012])[/](0[1-9]|[12][0-9]|3[01])[/]\d{4}$", ErrorMessage = "End Date should be in MM/dd/yyyy format")]
public DateTime? ExpirationDate { get; set; }
しかし、2013 年 5 月 13 日のような正しい形式で日付を入力すると、. それでもエラーメッセージが表示されます
End Date should be in MM/dd/yyyy format
欠落しているコード、または上記の他のエラーがあります。