Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

[Localization] data-val-number always in english

$
0
0

Hi everybody,

I'm actually working with ASP.NET 5 release candidate.

I have a form with many text or number fields.

These fields are required. I know that the number fields are automatically required and add RequiredAttribute is unnecessary.

When I submit my form with empty number field, I have this error in french "Le champ XXXX est requis". Then, if I type a letter into the number field, "G" for example, I have this error in english "The field XXXX must be a number.". That's true but I would like to define this message in french.

In MVC 5, I know that this message is automatically define as french without any settings for the fr-FR culture.

Have you any ideas to solve this problem ?

HTML code :

<input class="form-control input-sm input-validation-error" type="text" data-val="true" data-val-number="The field Assiette must be a number." data-val-required="Le champ Assiette est requis." id="Adherent_Assiette" name="Adherent.Assiette" value="25000,00">

Thanks.

Greg


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>