title: How to prevent a user from entering negative values in Html input
body: <p>I am using the following html input element for collecting the product quantity in Html page but the user can still go ahead and manually enter negative value. For example: I selected the the textbox and entered -100 and input field took it without complaining about it. </p>
  
  <p>How can I prevent user from entering 0 and non-negative values in Html input element?</p>
  
  <pre><code>&lt;input type="number" id="qty" value="" size="3" min="1" /&gt;
  </code></pre>