title: Validate phone number with JavaScript
body: <p>I found this code in some website, and it works perfectly. It validates that the phone number is in one of these formats:<br>
  <strong>(123) 456-7890</strong> or <strong>123-456-7890</strong>  </p>
  
  <p>The problem is that my client (I don't know why, maybe client stuffs) wants to add another format, the ten numbers consecutively, something like this: <strong>1234567890</strong>.</p>
  
  <p>I'm using this regular expression,</p>
  
  <pre><code>/^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/
  </code></pre>
  
  <p>How can I add that it also validates the another format? I'm not good with regular expressions.  </p>