title: textbox one with number only and another with comma in jquery
body: <p>I have two text box in a form. One verifies for number only and another one for number and comma.</p>
  
  <p><strong>1st case number only.</strong></p>
  
  <pre><code>function(textBoxObject) {
      var that = $(this),
      val = that.val();
  
      if (val === "" || isNaN(val)) {
        that.addClass("error");
      } else {
       that.removeClass("error");
      }
  }
  </code></pre>
  
  <p><strong>2nd case number and comma.</strong></p>
  
  <p>How do I handle another textbox which takes numbers and commas? And is it possible to add the logic in the first function itself?</p>