I have the following properties in my View Model:
public decimal Credit { get; set; }
[EmailAddress]
public string TestEmail { get; set; }
And I got these 2 error messages on Serverside validation, using @Html.ValidationSummary()
:
- The value '97,50 €' is not valid for Credit.
- Das Feld TestEmail enthält keine gültige E-Mail-Adresse.
The second one is perfect translated using the [EmailAddress]
Attribute. However the first one, is still in english. Why?
I have googled a bit but every solution is talking about customizing the Validation-messages. What I want is the default Validation-message, but translated to my Culture, like the [EmailAddress]
Attribute.
I have this in my web.config:
<system.web>
<globalization culture="de-DE" uiCulture="de-DE"/>
So how can I make the message The value '97,50 €' is not valid for Credit. be translated to another language?
I have not included the client side validation scripts.