Laravel - Can't get input errors when using google recaptcha

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Laravel - Can't get input errors when using google recaptcha



I'm using google recaptcha in my login form. I pasted script tag and the snippet in the login template and also added 'g-recaptcha-response' => 'required|captcha', to the array of validateLogin method in AuthenticatesUsers.php. when I submit the form, I only get error for recaptcha not email or password input! when I remove 'g-recaptcha-response' => 'required|captcha', I can get errors!


'g-recaptcha-response' => 'required|captcha',


validateLogin


AuthenticatesUsers.php


'g-recaptcha-response' => 'required|captcha',




1 Answer
1



Maybe you could try to set up a new validator by yourself (not sure it would work, that's an idea).



Here is the link to this doc section: https://laravel.com/docs/5.6/validation#manually-creating-validators



And an example in a controller file attached to the action:


protected function validator(array $data)
max:255






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS