anhskohbo / no-captcha

No CAPTCHA reCAPTCHA For Laravel.
https://packagist.org/packages/anhskohbo/no-captcha
MIT License
1.78k stars 234 forks source link

Validation does not work with laravel 4.2 #7

Closed joaquingares closed 9 years ago

joaquingares commented 9 years ago

In laravel 4.2 the double rule required|captcha only funcion with required. captcha always return false although the green tic and everything seem to be perfect. googje for that rule always return false. I spend a lot of time without any answer.

anhskohbo commented 9 years ago

In my test, everything look good.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Captcha</title>
</head>
<body>

    {{ Form::open() }}
        {{ Form::captcha() }}
        {{ Form::submit() }}
    {{ Form::close() }}

</body>
</html>
Route::post('captcha', function()
{
    $validate = Validator::make(Input::all(), array(
        'g-recaptcha-response' => 'required|captcha'
    ));

    var_dump($validate->passes());
});
anhskohbo commented 9 years ago

I don't use curl anymore https://github.com/anhskohbo/no-captcha/commit/e2954102c5cad3c96dd111545e9f820eaa9d0244