title: HTML form / submit button. How to validate inputs and prevent submit
body: <p>I want to use a submit button because it checks my form input attributes.</p>
  
  <p>My inputs are all numerical and have attributes of min / max / required all given by jQuery:</p>
  
  <pre><code>&lt;form id="form1"&gt;
  &lt;table id="table"&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;input type="number" /&gt; &lt;/td&gt;
      &lt;td&gt;
        &lt;input type="number" /&gt; &lt;/td&gt;
      &lt;td&gt;
        &lt;input type="number" /&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
    &lt;/form&gt;
  &lt;button form="form1"&gt;check inputs&lt;/button&gt;
  </code></pre>
  
  <p>And the validation attributes are assigned with jQuery (min: 1, max: 9, required)</p>
  
  <pre><code>  $('input').attr({
      min: 1,
      max: 9,
    }).prop('required', true);
  </code></pre>
  
  <p>I have jQuery set up to extract the numerical values from the inputs and put them into an array, but if I use this button, it attempts to 'submit' the form which I don't want. But if I add event.preventDefault() the submit button no longer checks for the min/max/required values. </p>
  
  <p>Essentially all I want my button to do is to check the validation requirements, and trigger the jQuery click event.</p>
  
  <p>EDIT / CLARIFICATION:</p>
  
  <p>I want 3 things:
  1. prevent the form from submitting. No POST 
  2. Validate / make sure each input has a valid value
  3. trigger a jQuery click event 
  ( $('button').on('click', function(){ do something...  });</p>