I have integrated reCAPTCHA into my project using JavaScript to generate the captcha. The code I used is as follows:
Recaptcha.create(private_key, 'captchadiv',
{
theme: "clean",
callback : function()
{
$("#recaptcha_response_field").attr("required",true);
}
});
The issue I am facing is that when the page loads for the first time, the reCAPTCHA appears invalid like shown in the image below.
Can anyone suggest a solution for this problem?
Thank you.