thinhbuzz / laravel-google-captcha

Google captcha for Laravel 5, Laravel 6, Laravel 7, Laravel 8, Laravel 9 and Laravel 10, support multiple captcha on page
MIT License
200 stars 32 forks source link

fails() method are always true #36

Closed hamid80386 closed 10 months ago

hamid80386 commented 5 years ago

I used of this rule to validate recaptcha:

$validate = Validator::make($request->all(), [
            'g-recaptcha-response' => 'required|captcha',
            'name' => 'required',
        ]);

But this way always return fail, even when i checked recaptcha

if ($validate->fails()) {
         var_dump($vlidate); 
         dd('fails');
}

When i checked passes() method is true and when i don't check, passes() return false, but in both sitiuation fails() method is true

thinhbuzz commented 5 years ago

please share your environment