title: How to validate for Values "0" or "00" or "000" for textfield which has the regex and some accepted values
body: <pre><code>var myregex = /^[0-9][0-9]{0,3}$|^[0-9][0-9]{0,3}[\.][0-9]$/;
  if(!myregex.test($('#txt1').val()) || $('#txt1').val()=="0"){
      alert("Please Enter Correct value");
  }
  </code></pre>
  
  <p>Now My mandatory things are it should  </p>
  
  <ol>
  <li>follow Regex</li>
  <li>we should not able to enter the value "0" or "00" or "000"</li>
  </ol>
  
  <p>So my above if() raises an alert if the user enter a  "0" and if we enter "00" or "000" or "0000" it doesnot catch it .But if we enter "00000" it catches it due to regex. How can i handle for 2,3,4 zeros .Now Here I can put a regex which doesnot accept zeros such as this one "<code>/^[^0].*$/</code>" but My textfield should Accepts this values as right (0.2,0.3,0.4) .so i cannot use this regex.</p>