0

I used the google recaptcha v2 in long form. Before click the captcha validation handled by handleCorrectCaptcha method. If click the captcha checkbox then the captcha expired before the form submitting. Then when i click the submit button form becomes submitted without captcha. I don't know how to validate after captcha expired. Even i go through the https://support.google.com/recaptcha/?hl=en. I don't find the solution. Thanks in advance

My Html code is

<re-captcha (captchaResponse)="handleCorrectCaptcha($event)" site_key="*****************************"></re-captcha> 

My Angular2 Code is

handleCorrectCaptcha(captchaResponse: string) { this.captchaResponse=captchaResponse; this.appRef.tick(); } 

Recaptcha error

1 Answer 1

1

HTML code is

<re-captcha (captchaResponse)="handleCorrectCaptcha($event)" site_key="*****************************" (captchaExpired)="handleExpired()"> </re-captcha> 

Angular2 Code is

handleCorrectCaptcha(captchaResponse: string) { this.captchaResponse=captchaResponse; this.appRef.tick(); } handleExpired(){ this.captchaResponse=null } 

I ask sorry for posting the simple question

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.