title: Regular Expression, allow whitespace in between text
body: <p>I have the following validation code wherein it filters only alpha numeric + white space text... But upon testing two alpha numeric words with whitespace, it fails...  </p>
  
  <pre><code>$.validator.addMethod("alphaNumeric", function(value, element) {
      $(element).val(value.replace(/^\s+|\s+$/g,''));
      return /^[a-zA-Z0-9 ]*$/.test(value);
  }, " AlphaNumeric Only!");
  </code></pre>
  
  <p>What is wrong with my code?</p>