title: html5 required and jQuery submit()
body: <p>I'm trying to implement html5 into a form, but I came with a problem when I submit the form through jquery and try to use the html5 "required" attribute.</p>
  
  <p>Here is my form, quite simple:</p>
  
  <pre><code>&lt;form action="index.php" id="loginform"&gt;
        &lt;input name="username" required placeholder="username" type="text"&gt;    
        &lt;a href="javascript:$('#loginform').submit();"&gt;Login&lt;/a&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The problem is that when the form is submited through jquery, It just by-passes the required attribute. I know that required should only work if the form is submitted by the user, not by a script, so when I change the anchor to a submit input it works perfect.</p>
  
  <p>My point is if there is a way to force the jquery .submit() to use html5 required atribute.</p>
  
  <p>Thanks in advance for the answers</p>