title: Validator (npm) Username Validation
body: <p>I am building a web app with Node.js.</p>
  
  <p>I am currently using the <code>validator</code> package to validate inputs. I would like to have only alphanumeric characters allowed, but with the period, underscore and hyphen allowed also. (. _ -)</p>
  
  <p>Some sample code is below:</p>
  
  <pre><code>if (!validator.isEmpty(username)) {
      console.log('Username not provided');
  } else if (!validator.isAlphanumeric(username)) {
      console.log('Username is not alphanumeric');
  } else {
      console.log('Good Username!');
  }
  </code></pre>
  
  <p>I would like to have somewhere in the code above that checks for periods, underscores, and hyphens and allows them to get through the <code>validator.isAlphanumeric</code> method.</p>
  
  <p>Thank you.</p>