Go over everything in 3. Validate the CAPTCHA In Your Laravel Controller on their site, you may have missed a small detail, or have a typo.
https://captcha.com/doc/php/howto/laravel-captcha.html
Mar 16, 2016
5
Level 1
laravel captcha cannot validate
Hi all, I'm install captcha for Laravel 5.2.* using step by step in this guide: https://captcha.com/doc/php/howto/laravel-captcha.html I declare a LoginForm class with rules below:
class LoginFormRequest extends Request {
.....
public function rules()
{
return [
'username' => 'required|max:30',
'password' => 'required|max:200',
'CaptchaCode' => 'required|valid_captcha',
];
}
}
Here is my template:
{!! captcha_image_html('LoginCaptcha') !!}
<input type="text" class="form-control" id="CaptchaCode" name="CaptchaCode">
The captcha display very good. But it always display that "CAPTCHA validation failed, please try again." I've already tried to debug in LaravelCaptchaServiceProvider class. In function "registerValidCaptchaValidationRule" i see it still works fine.
Log::info(($captcha->Validate($value))? "captcha true": "captcha false");
Please help me, what is the exact errors here? Thank you!
Please or to participate in this conversation.