greggilbert / recaptcha

[ABANDONED] reCAPTCHA Validator for Laravel 5
MIT License
714 stars 197 forks source link

extend vs extendImplicit? #118

Closed jmp909 closed 8 years ago

jmp909 commented 8 years ago

is there a reason extendImplicit is used?

I don't want to run the recaptcha check if it has not been supplied

eg with extend the recaptcha check would not run when using required|recaptcha if I don't complete the recaptcha. it will just fail due to the required

because extendImplicit is used, then both rules run and 2 errors are returned

theoretically both aren't required as they mean the same thing?

thanks J

jmp909 commented 8 years ago

actually I've just noticed if you set both responses the same then only one is shown

'g-recaptcha-response.required' => 'Please complete the captcha',
'g-recaptcha-response.recaptcha' => 'Please complete the captcha',
greggilbert commented 8 years ago

No particular reason extendImplicit is being used. There is a semantic difference between required and recaptcha, though, namely that the first is whether or not there is a value in the box, and the second is whether or not that value is valid.