Scenario: A user enters a string in the DateTime field. A * appears when a postback occurs but no message in a ValidationSummary. I have tried implementing IDataErrorInfo but the code never falls through IDataErrorInfo.this[string columnName] for the EventDate field. I have tried implementing DataAnnotations attributes again this doesn't work. By the time code reaches the attribute checks the EventDate has been changed to DateTime.MinValue by the framework.
Any help gratefully received.
I have posted the same questions to ASP.Net MVC forums, Steve Sanderson, Stephen Walter and Schotime but no answers so whoever fixes this is a MVC Master.
View:
<%= Html.ValidationSummary() %>
<label for="EventDate">EventDate:</label>
<%=Html.TextBox("Dinner", Model.EventDate)%>
<%= Html.ValidationMessage("EventDate", "*") %>
Controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Dinner item)
public ActionResult Edit(int ID, FormCollection coll)
{
//What would you recommend?
}