title: How to use javascript regex to check for "empty" form fields?
body: <p>I am working on a php+javascript based project and have already made up a mockup page at :
  <a href="http://chenximao.net/apps/balloon" rel="noreferrer">my website</a></p>
  
  <p>I knew how to use javascript or php to check whether a particular field of form is "empty"or not, that is, whether it contains alphanumerical characters other than whitepsace characters(for instance, space, tab and newline).</p>
  
  <p>However, my normal apporach no longer works since the jquery plugin that I am using now relies on regex to validate the fields.</p>
  
  <p>If you go to the third tab(3. Fill up Shipping Info and Make Payment), you can enter something into the Firstname field and it does the check automatically. Fine. However, if
  you just simply put some space characters there and jump to the next field, well, it still feels okay for that, which is not correct since no one's first name is nothing!</p>
  
  <p>The problem? At the back it has a regex like this :</p>
  
  <pre><code>"noSpecialCaracters":{
                      "regex":"/^[0-9a-zA-Z ]+$/",
                      "alertText":"* No special caracters allowed"},
  </code></pre>
  
  <p>This would not filter out empty characters. </p>
  
  <p>I searched online and tried my best to make up another regex to match, I tried </p>
  
  <pre><code>"regex":"/^[^]+$/"
  </code></pre>
  
  <p>for matching non-empty characters, but that will not do...</p>
  
  <p>Can anyone help me out? Many thanks in advance!</p>