title: ASP.NET Core localization decimal field dot and comma
body: <p>I have a localized ASP.NET Core Web Application: en-US and it-IT.</p>
  
  <p>On en-US the decimal separator is dot, in it-IT the decimal separator is comma.</p>
  
  <p>I have this ViewModel</p>
  
  <pre><code>public class MyViewModel 
  {
      public int Id {get; set; }
  
      // Omitted
  
      public decimal? Amount{get; set;}
  
  }
  </code></pre>
  
  <p>For the decimal field when I render the create/edit page on <strong>en-US</strong> the html textbox render</p>
  
  <blockquote>
    <p>1000.00</p>
  </blockquote>
  
  <p>If I POST the form, the operation complete without errors.</p>
  
  <p>So far so good.</p>
  
  <p>When I render the create/edit page on <strong>it-IT</strong> the html textbox render</p>
  
  <blockquote>
    <p>1000,00 (notice the comma)</p>
  </blockquote>
  
  <p>And IF I try to POST the form, (CLIENT) validation <strong>fail</strong> with </p>
  
  <blockquote>
    <p>The field Amount must be a number.</p>
  </blockquote>
  
  <p>I read about the IModelBinder but I understand is for mapping the viewModel when the form is posted on the server, on my case I'm blocked by the client-side validation.</p>
  
  <p>The better is to use dot when en-US and comma when it-IT, but it's fine using only the dot</p>