Closed felixlandicho closed 8 years ago
I'll check and reply you soon
I have same issue.
@anhskohbo I have the same issue, please answer :)
Same for me. I run it under Homestead witch success. On my provider (Hosteurope) the same code fails with above message.
@lehnen I had incorrect secret key copied in my configuration file, please double check :)
Good luck
@Lotuashvili Nice quick answer ;) I checked the keys and they are identical on both sides. Also both domains are mentioned in Googles reCapcha console as valid for the keys.
Fix for me: I wanted to use ReCaptcha, not NoCaptcha. Since the documentation of reCaptcha states to use POST parameter for validation (https://developers.google.com/recaptcha/docs/verify#api-request) I implemented it by myself, based on this code. I used Guzzle to make a POST request instaed of the GET request used by the original code an it works.
Maybe you are trying to validate one recaptcha's response twice (when resubmit form). Every result key is one-time used.
Fixed with latest commit.
@anhskohbo Still same issue.
I get validation.captcha
in both situations:
NOCAPTCHA_SECRET
, valid NOCAPTCHA_SITEKEY
NOCAPTCHA_SECRET
, non-valid NOCAPTCHA_SITEKEY
May this error being caused by non-https request to recaptcha api (I'm on local now)?
Can I set custom validation message for this case?
Anybody here?
Can confirm, I receive this as well with the current version.
Still have a problem too.
Checked my secret/private key, turns out Google for whatever reason reset the key on me.
Maybe check that.
still getting this issue with laravel 5.8.
i was using this from documentation
$validate = Validator::make(Input::all(), [
'g-recaptcha-response' => 'required|captcha'
]);
then i changed it to this
$validate = Validator::make(Input::all(), [
'g-recaptcha-response' => 'required'
]);
according to stackoverflow and it worked liked charm.
@iwaqarhussain I can confirm, that works. Thanks.
@iwaqarhussain I can confirm, that works. Thanks.
I'm assuming this effectively just removes the validation for the captcha - hence, if the captcha is invalid/not correctly filled, it won't actually throw an error which is entirely the point of the captcha.
Not sure i'd reco this.
@iwaqarhussain I can confirm, that works. Thanks.
I'm assuming this effectively just removes the validation for the captcha - hence, if the captcha is invalid/not correctly filled, it won't actually throw an error which is entirely the point of the captcha.
Not sure i'd reco this.
No, that's not the way this works.
It do what it's supposed to do
@iwaqarhussain I can confirm, that works. Thanks.
I'm assuming this effectively just removes the validation for the captcha - hence, if the captcha is invalid/not correctly filled, it won't actually throw an error which is entirely the point of the captcha. Not sure i'd reco this.
No, that's not the way this works.
It do what it's supposed to do
You may get client side validation on behalf of google, but in terms of your own actual server side validation, if you have no other code to validate the captcha, it will not be validated on your end (server side) AFAIK.
If you don't use the "captcha" rule, the function verifyResponse will not be hit. verifyResponse is the function that effectively checks with Google to ensure that the token provided through the post requests matches and is valid.
There should be another solution other than simply removing the rule all-together. Otherwise your captcha may not be solid.
You can see that someone commented below on the solution on StackOverflow.
Please dont use this: 'g-recaptcha-response' => 'required'
Use this format: 'g-recaptcha-response' => 'required|captcha'
Check your API Key AND settings in Console. It should work.
Hi,
Why do I receive this error? even if the noCaptcha is a green check.
"g-recaptcha-response" => array:1 [ 0 => "validation.captcha" ]
Thanks