KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say I have this property in my model: [DisplayName("test")] [Required(ErrorMessage = "required")] public DateTime? SomeDate { get; set; } when you type in "asdf" in Html.TextBoxFor(model => model.SomeDate) , you get the validation error message "The value 'asdf' is not valid for test.". How do you modify that message? ASP.NET MVC ignored [DataType(DataType.DateTime, ErrorMessage = 'some other message')]
Tags (comma-separated)
Save Edits
Cancel