How can I validate google reCAPTCHA v2 using javascript/jQuery?

The Solution to How can I validate google reCAPTCHA v2 using javascript/jQuery? is


This Client side verification of reCaptcha - the following worked for me :

if reCaptcha is not validated on client side grecaptcha.getResponse(); returns null, else is returns a value other than null.

Javascript Code:

var response = grecaptcha.getResponse();

if(response.length == 0)
    //reCaptcha not verified

else
    //reCaptch verified

~ Answered on 2015-04-23 10:07:41


Most Viewed Questions: