title: Validate that text field is numeric usiung jQuery
body: <p>I have a simple issue -- I would like to check a field to see if it's an integer if it is not blank. I'm not using any additional plugins, just jQuery. My code is as follows:</p>
  
  <pre><code>if($('#Field').val() != "")
  {
      if($('#Field').val().match('^(0|[1-9][0-9]*)$'))
      {
          errors+= "Field must be numeric.&lt;br/&gt;";
          success = false;
      }
  }
  </code></pre>
  
  <p>...It doesn't seem to work. Where am I going wrong?</p>
  
  <p>The error I receive is <code>val() is not an object</code>.</p>
  
  <hr/>
  
  <p>It turned out that the real issue was that I had my element name set and not the Id.</p>