Hi How can I change the default error message for required rule validation for example?
A:
You can check the Localizing ASP.NET Validation blog post of Phil Haack.
korchev
2010-05-14 06:34:09
I don't want to write for each field this :[Required(ErrorMessage = "Mandatory field not provided")]I want to change the default message that mvc2 gives me
Lullaby
2010-05-14 11:34:03
A:
You can write your own MyRequiredAttribute in wich change the default error message and use it.
msi
2010-05-14 13:13:13