2017-11-05 9 views
0

私は長い形式のgoogle recaptcha v2を使用しました。 handleCorrectCaptchaメソッドが処理するcaptcha検証をクリックする前に、 captchaチェックボックスをクリックすると、フォームが送信される前にcaptchaが期限切れになります。次に、送信ボタンをクリックすると、フォームはcaptchaなしで送信されます。私はcaptchaが期限切れになった後に検証する方法を知らない。でも、私は解決策を見つけることができませんhttps://support.google.com/recaptcha/?hl=en.を通過します。事前に感謝Google Recaptcha V2の有効期限が切れた後

私のHTMLコードです

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

マイAngular2コードです

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

Recaptcha error

答えて

0

HTMLコードです

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

Angular2コードI S

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

handleExpired(){ 
    this.captchaResponse=null 
} 

私は簡単な質問

を投稿して申し訳ありません尋ねます
関連する問題