title: RegEx for Phone number in JavaScript
body: <p>I was using RegEx to validate user phone numbers. I have set of requirements for phone number validation. I dont have much idea about the RegEX. can anyone help me to provide a matching reqex for my requirement. Here the validation is very simple.</p>
  
  <p><strong>Conditions</strong></p>
  
  <pre><code> 1. It should allow numbers from 0-9.
   2. It should allow + sign. (+ sign is not mandatory but not allow after even a single letter (ie: should be placed at front.)).
   3. It should allow - sign. (- sign is also not mandatory and can be placed anywhere)
   4. It should allow empty space everywhere.
   5. No dots or no other chars allowed except the above said things.
  </code></pre>
  
  <p><strong>Correct values</strong></p>
  
  <pre><code>+65-12345678
  65-12345678
  6512345678
  65 12345678
  65 123 45678
  65 123-45678
  +65 123-45678
  1234
  </code></pre>
  
  <p><strong>InCorrect values</strong></p>
  
  <pre><code>12345+86666
  123alpha
  </code></pre>
  
  <p>Thanks</p>