Hi, i'm using Linq to SQL for my model with a custom validation layer. I cannot find the way to edit or change the default message:
The value '29/34/1980' is not valid for BirthDate.
BirthDate is of course my textbox. Any ideas? Thanks
EDIT: this is the simple code i'm using:
<%= Html.Label("Data di Nascita (GG/MM/AAAA)", "BirthDate")%>
<%= Html.TextBox("BirthDate", Model.BirthDate) %>
<%= Html.ValidationMessage("BirthDate", " *") %>
and this is the validation code, that does not override the default message:
if (!(person.BirthDate > DateTime.MinValue)) // Diverso dal default
_validation.AddError("BirthDate", "Il campo 'Data di nascita' non è valido");