If you normally work with a locale other than English, you need to include the correct locale-specific jQuery scripts, which you can download from the following URL:


For example, for German locales, you need to download the following file:


You then need to include the correct script reference in your .cshtml file,s as in the following example:

<script src="@Url.Content("~/Scripts/methods_de.js")" type="text/javascript"></script>

You don't need to include the localized messages script (messages_de.js for German locales), because ASP.NET MVC and the DataAnnotations types use their own localized messages.

In addition to including the localized methods script, the current locale on the server must be set to the target locale so that any server-side messages (used for both client-side and server-side validation) will be used correctly.

If you use a non-English locale, you should also use the correct locale-specific character for the decimal delimiter in the price. (In German, for example, you would enter a price as "9,99".) On some non-English keyboards, the dot character (.) does not produce the English dot character used for decimal places; in those cases, if you use a dot character for the decimal point, you might see the following error:

The field Price must be a number.

Some of the locale specific methods scripts are not complete. schrijf_rob posted the following in the comments section of part 6 of my Intro to MVC 3 tutorial.

I live in the Netherlands and had the same problem inputing '9,99'. Originally I used methods_nl.js. But that did not work. So I compared it with methods_de.js and found that the number part was missing in methods_nl. I copied that part from methods_de and it all worked. We do have the same numbering system as in Germany so for other countries youe might need to tweek it a little. My methods_nl.js now looks like this:

jQuery.extend(jQuery.validator.methods, {
    date: function (value, element) {
        return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
    number: function (value, element) {
        return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);

The following MVC 3 tutorials use jQuery validation:

To set your locale:

  1. In Control Panel, open Regional and Language Options.
  2. Select the Location tab.
  3. In the drop down box, select your target locale.