Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple validations of the captcha rule #134

Open
ghost opened this issue May 12, 2017 · 0 comments
Open

Multiple validations of the captcha rule #134

ghost opened this issue May 12, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented May 12, 2017

So, due to being very tired at one point I arrived at the following code in my project

if($validator->fails()) // check if password is correct and the captcha is filled in as well
{
	$this->increaseFaults($request); // increase the number of failed login attempts
}
		
$validator->validate(); // use validate to automatically deal with errors

Basically what I wanted to do was to show the captcha only after the user had multiple failed attempts at entering his password. What I didn't realize at that point was that the recaptcha validation rule wasn't 'pure' - and by this I mean that checking the captcha would work for the first check ( fails() ), but fail for the second one ( validate() ).

I suppose that this kind of double checking should never occur, but I guess the README should state this behavior somewhere.

@ghost ghost changed the title Multiple validation of the captcha rule doesn't work Multiple validations of the captcha rule May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants