title: Submit input after 7 characters
body: <p>I have a web-app using a single input form that is filled via a barcode scanner. I have noticed on barcodes over 6 characters the barcode scanner prematurely submits, causing the form to submit with the incorrect data. I have managed to prevent the barcode scanner from returning (can be done via programming, but we go through barcode scanners, so I'd rather it be plug and play for employee's). my question is - How can make sure the form isn't submitted until the full 7 characters are entered? Any recommendations appreciated. </p>
  
  <p>here is my form</p>
  
  <pre><code>&lt;form action="PupListMobile.php" id="my_form" method="get"&gt;
       &lt;label for="text-1"&gt;&lt;/label&gt;
       &lt;input type="text" autofocus name="sID" id="sID" value="" id="my_button" placeholder="CLICK TO SCAN:"&gt;
       &lt;input type="hidden" name="lane" value="1" /&gt;
       &lt;input id="subHere"type="submit" value="Submit"  /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is my J Query</p>
  
  <pre><code>$('#sID').keyup(function(){
      if(this.value.length ==7){
      $('#subHere').click();
      }
  });
  
  $(document).ready(function() {
    $(window).keydown(function(event){
      if(event.keyCode == 13) {
        event.preventDefault();
        return false;
      }
    });
  }); 
  </code></pre>