title: Removing toLocaleString formating when checking field validation
body: <p>I have a form field (string) for which I'm adding a "space" thousand separator using this script:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  // https://stackoverflow.com/questions/19470499/how-to-format-input-box-text-as-i-am-typing-it
      jQuery(document).ready(function($) {
          $("#input_10").on('keyup', function(){
          var n = parseInt($(this).val().replace(/\D/g,''),10);
          $(this).val(n.toLocaleString());
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>So user types : "100000" and it will display "100 000"</p>
  
  <p>Later on, during form submission, I have a PHP statement which verifies if the field contains a numeric value.</p>
  
  <p>Now comes the problem ($value is the value of the formatted field):</p>
  
  <ol>
  <li>is_numeric($value) is not true due to the "space" thousand separator, so I tried removing the space but:</li>
  <li>is_numeric(str_replace(' ', '', $value)) is also not true and does not delete the space added by toLocaleString</li>
  </ol>
  
  <p><strong>How can delete the toLocaleString format that has been added in jQuery when doing my field validation in PHP?</strong></p>
  
  <p><strong>EDIT:</strong> PHP Code used:</p>
  
  <pre><code>add_filter( 'gform_field_validation_1_10', 'bja_gf_custom_validation10', 10, 4 );
  function bja_gf_custom_validation10( $result, $value, $form, $field ) {
      $formatedNumber = str_replace(' ', '', $value);
          if ( $result['is_valid'] &amp;&amp; !is_numeric($formatedNumber) ) {
              $result['is_valid'] = false;
              $result['message'] = 'formatedNumber:' . $formatedNumber;
          }
          return $result;
  }
  </code></pre>
  
  <p>Thanks !</p>