title: When using Google Invisible Captcha automatic html form validation and required attribute does not work. Why?
body: <p>I am trying to implement the new Google Invisible Recaptcha and for some reason yet unknown to me the automatic html form validation and the required attributes does not seem to be working after along with the Recaptcha. I am guessing it is because of the onSubmit() function callback. Can someone let me know how to fix this issue? Thanks in advance.</p>
  
  <p>Below is my implementation of a form with Google Invisible Recaptcha. The data-sitekey has been intentionally removed.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script src="https://www.google.com/recaptcha/api.js" async defer&gt;&lt;/script&gt;
    &lt;script&gt;
      function onSubmit(token) {
        document.getElementById("contactForm").submit();
      }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="contactForm" action="#" method="POST"&gt;
    &lt;p&gt;Leave a Message&lt;/p&gt;
    &lt;label for="inputName"&gt;Name&lt;/label&gt;
    &lt;input type="text" name="Name" id="inputName" placeholder="Name" required&gt; &lt;br&gt;
    &lt;label for="inputEmail"&gt;Email&lt;/label&gt;
    &lt;input type="email" name="Email" id="inputEmail" placeholder="Email Id" required&gt; &lt;br&gt;
    &lt;label for="inputMessage"&gt;Message&lt;/label&gt;
    &lt;input type="text" name="Message" id="inputMessage" placeholder="Message" required&gt;&lt;br/&gt;
    &lt;button class="g-recaptcha" type="submit" data-sitekey="//site-key" data-badge="bottomleft" data-callback='onSubmit'&gt;Submit&lt;/button&gt;
    &lt;button type="reset"&gt;Reset&lt;/button&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>