如何在ASP.NET MVC中更改默認驗證錯誤消息?說我的模型中有這個屬性:[DisplayName("test")][Required(ErrorMessage = "required")]public DateTime? SomeDate { get; set; }當您輸入“asdf”時Html.TextBoxFor(model => model.SomeDate),您會收到驗證錯誤消息“值'asdf'對測試無效?!?。你如何修改那條消息?ASP.NET MVC被忽略了[DataType(DataType.DateTime, ErrorMessage = 'some other message')]
- 2 回答
- 0 關注
- 604 瀏覽
添加回答
舉報
0/150
提交
取消