title: Javascript - Removing spaces on paste
body: <p>I have an input text field with a maxlength of 10. The field is for Australian phone numbers (10 digits). Phone numbers are generally split up into the following syntax</p>
  
  <pre><code>12 12345678
  </code></pre>
  
  <p>If someone copies the above and pastes that into my input field, it obviously leaves the last digit out and keeps the space.</p>
  
  <p>Is there a way to remove any spaces right before it is pasted into the input box? Or is there another work around?</p>
  
  <p>Thanks in advance.</p>