I am currently trying to add reCAPTCHA on the client side and I have followed the documentation accordingly from both Google and reCAPTCHA's website. However, for some reason I keep getting this error message:

I've placed my script tag in the head and my reCAPTCHA div just before the closing form tag.
<!-- Google reCAPTCHA API -->
<script src='https://www.google.com/recaptcha/api.js' async defer> </script>
<form action="URL: https://www.google.com/recaptcha/api/siteverify" method="POST"> -->
<!-- reCAPTCHA Widget Appears Here -->
<div class="g-recaptcha" data-theme="darklight" data-sitekey="my_public_sitekey"></div> -->
</form>
Please let me know if you need to see more of my code. From what I've read in other forums people had to disable domain name validation, however, that causes issues with verification.
Any help is much appreciated. Thanks!