title: Asp.Net MVC: Client data validation in double, with localization
body: <p>I've a small problem with my Asp.Net MVC.</p>
  
  <p>For now I've developed a website in english, everything is working fine, all my texts are already in localization, and I've already a session based system. When I go to another language(in my case french), it changes the <code>Thread.CurrentThread.CurrentUICulture</code> and <code>Thread.CurrentThread.CurrentCulture</code> to a culture info created from "fr".</p>
  
  <p>All my traductions is working, but I've a problem in one form.</p>
  
  <p>In France, the decimal part is separated from the integer part with ",". The server validation works fine with it and translate "234,512"(and know transforms "234.512" too)into a double.</p>
  
  <p>But the client validation doesn't accept this, it says:</p>
  
  <pre><code>"Le champ XYZ doit être un nombre."
  </code></pre>
  
  <p>So it has the correct local(because the message is translated in french), but it seems to want the number edited in "235,55".</p>
  
  <p>At start I thought it wasn't a big deal, users can enter number with the "234.512" format, but the problem is for the edition of data, since the thread is in French, it fill the model with "234,512", and not "234.512", and because of that customer must change the separator on every change(event if they don't make change on this field) otherwise they get a <strong>client</strong> validation error(no call are being made when I press on the submit button, I checked several times).</p>
  
  <p>So what should I do to have the client validation script for double working in the current locale?</p>
  
  <p>Thank you very much!</p>