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

Interface 'Illuminate\Contracts\Validation\Rule' not found #64

Closed
visualight opened this issue Oct 1, 2017 · 4 comments
Closed

Interface 'Illuminate\Contracts\Validation\Rule' not found #64

visualight opened this issue Oct 1, 2017 · 4 comments

Comments

@visualight
Copy link

visualight commented Oct 1, 2017

  • noCaptcha Version: ^5.0
  • Laravel Version: 5.4.35
  • PHP Version: 7.0.22

Description:

Error on validation
Interface 'Illuminate\Contracts\Validation\Rule' not found - in CaptchaRule.php (line 12)

Steps To Reproduce:

Create a validatorRequest File in request directory and use the following rule :
use Arcanedev\NoCaptcha\Rules\CaptchaRule;

public function rules()
{
    $rules = [
        'name' => 'required',
        'email' => 'required|email',
        'message' => 'required',
        'g-recaptcha-response' => ['required', new CaptchaRule],
    ];

    return $rules;
}

Processing :

public function sendmail(ValidatorRequest $request)
{
    $data = $request->all();
    dd($data);
}
@tehwave
Copy link

tehwave commented Oct 1, 2017

CaptchaRule implements Rule, which was introduced in Laravel 5.5.

@visualight
Copy link
Author

How to work with Laravel 5.4 ?

@tehwave
Copy link

tehwave commented Oct 1, 2017

Use release version 4.0.1

https://github.com/ARCANEDEV/noCAPTCHA/releases/tag/4.0.1

@arcanedev-maroc
Copy link
Member

Downgrade your version to ~4.0

Related: #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants