I have a custom plugin with submit form is there any way to implement ReCaptcha to this form?

I tried to insert this code from google instructions:
Paste this snippet before the closing </head> tag on your HTML template:
<script src='https://www.google.com/recaptcha/api.js'></script>
Paste this snippet at the end of the <form> where you want the reCAPTCHA widget to appear:
<div class="g-recaptcha" data-sitekey="blablabla"></div>


and I can see reCAPTCHA on the page, however submit button is not validating the value of the captcha.

I guess I should add some back end code for this. Could you please advise some manuals or examples to do so?