title: Regex jquery the proper way
body: <p>I am trying to do a few form validation checks and I am facing some problems. First of all could some one tell me is the match function the right way to check a string. Secondly could some one explain why is this not working and what is the right format. I am trying to check if there is anything except alphabets (Letters) It works fine for numbers and returns an error but if i type (.) / ; etc anything except a number it allows and no error is reported. </p>
  
  <pre><code>  if ($("#firstname").val().match(/[a-zA-Z]/))
  </code></pre>
  
  <p>I want to only allow alphabets nothing else. One more thing this confuses me alot if there is a match the error will go in else right? For instance.</p>
  
  <pre><code>   if ($("#firstname").val().match(/[a-zA-Z]/))
     {  // no match carry on... }else
  
     {/ found match display error }
  </code></pre>
  
  <p>Thanks help is much appreciated!</p>