title: Number Format does not work in ASP.NET Core
body: <p>I try to allow decimals in my application (ASP.NET Core running on .Net 4.5.2 Full Framework in Azure). The application is configured to only use de-DE culture in <code>Startup.cs</code> with a custom <code>DateTime</code> format:</p>
  
  <pre><code>var dtf = new DateTimeFormatInfo
  {
      ShortDatePattern = "dd.MM.yyyy",
      LongDatePattern = "dd.MM.yyyy HH:mm",
      ShortTimePattern = "HH:mm",
      LongTimePattern = "HH:mm"
  };
  
  services.Configure&lt;RequestLocalizationOptions&gt;(options =&gt;
  {
      var supportedCultures = new List&lt;CultureInfo&gt;
      {
          //new CultureInfo("en-US") { DateTimeFormat = dtf },
          //new CultureInfo("en") { DateTimeFormat = dtf },
          new CultureInfo("de-DE") { DateTimeFormat = dtf },
          new CultureInfo("de") { DateTimeFormat = dtf }
          //new CultureInfo("en-US"),
          //new CultureInfo("en"),
          //new CultureInfo("de-DE"),
          //new CultureInfo("de")
      };
  
      options.DefaultRequestCulture = new RequestCulture(culture: "de-DE", uiCulture: "de-DE");
      options.SupportedCultures = supportedCultures;
      options.SupportedUICultures = supportedCultures;
  });
  </code></pre>
  
  <p>My model looks like this, I also tried to use <code>{0:#.###}</code> which also did not work as well as changing the type to <code>decimal?</code>.</p>
  
  <pre><code>[Display(Name = "ContainerWeight", ResourceType = typeof(SharedResource))]
  [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:N3}")]
  public float? Weight { get; set; }
  </code></pre>
  
  <p>If I Submit my form, I get an error with JavaScript validation if I use e.g. <code>111,222</code> on my machine which is an en-US Windows machine and I get a model error in my Controller if I use <code>111.222</code>. On a german machine it's exactly the opposite as it seems (I asked someone to check that for me). This is the part of the View:</p>
  
  <pre><code>&lt;div class="form-group col-sm-12 col-md-6"&gt;
      &lt;label asp-for="Weight" class="col-md-3 control-label"&gt;&lt;/label&gt;
      &lt;div class="col-md-9"&gt;
          &lt;input asp-for="Weight" class="form-control" /&gt;
          &lt;span asp-validation-for="Weight" class="text-danger" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I had similar trouble getting the <code>DateTime</code> format to work but figured it out, this one seems to hard for me.</p>