title: Total textbox value should not be zero using jquery
body: <p>Im checking the textbox value should not accept zero.. its working if I give all 0's or a single 0. But, when I give value such as 00010, its also validating.. which it should not. I'm using indexOf to test the field value.</p>
  
  <p>The total value of the textbox should not be 0. </p>
  
  <p>here is my code </p>
  
  <pre><code> function AlertSave() {
      var val = $('#txt').val().replace(/[\s\n\r]/g,"");
      if( val == 0 || val.indexOf("0") &gt; -1){
          alert('should not be 0')
      }
   }
  </code></pre>
  
  <p>A simple fiddle </p>
  
  <pre><code>http://jsfiddle.net/h4JXs/4900/
  </code></pre>