I have common issue to that How to change default validation error message in ASP.NET MVC?
I'm trying to set default validation message for all types in app but I use MVC3 and Razor engine. Unfortunately ssg solution doesn't work for me.
Take a look at Model Metadata and Validation Localization using Conventions
I know this is an old post but..
I just create C# validation code to determine if it isn't valid then return a validation message for an invalid string length.
if (String.IsNullOrEmpty(ValidEIN))
{
Validation.Add("EIN",
Validator.StringLength(0, 0, "Employee ID doesn't exist.")
);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With