title: Validate input type=number min=... single field, no form
body: <p>I have an</p>
  
  <pre><code>&lt;input type=number min=0 id='myinput'&gt;&lt;button ....&gt;
  </code></pre>
  
  <p>and some ajax which fires when the button is pressed.</p>
  
  <p>If I enter a value outside the allowed range of the number, the border of the field becomes red, and I guess if it were a form, it wouldn't be submitted.</p>
  
  <p>But my javascript doesn't know if the browser likes the input or not.</p>
  
  <p>It is for an internal site, and I know that all users use a modern browser.</p>
  
  <p>Can I check if the browser thinks the number is valid in my script which processes the button?</p>
  
  <pre><code>if ($("#myinput").BrowserSaysInputIsValid()) {...}
  </code></pre>
  
  <p>I don't have a form, as I just have a number of number-files with corresponding buttons and actions.</p>
  
  <p>It is a stock management system.</p>
  
  <pre><code>[ 1 ][Move to Dept 1]
  [ 0 ][Move to Dept 2]
  </code></pre>
  
  <p>So you enter a number and press the number next to it, and the javascript fires ajax changes. (It is done this way, because A: you most the time only do one action. B: It's more difficult to check that you dont move 10 to dept 1 and 20 to dept 2 and only have 20 in stock, if both moves are processed at the same time.)</p>
  
  <p>Do I HAVE to build a form around each  ? </p>