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

Method Sunspikes\ClamavValidator\ClamavValidator::validateColorHex does not exist. #40

Open
SamuelWei opened this issue Nov 26, 2020 · 4 comments

Comments

@SamuelWei
Copy link

Just like in #19 I have trouble using this extension. If used with for example this extension https://github.com/Kaishiyoku/laravel-color-validation and the form validation rule is just ['required', 'color_hex'] I get the following error:

BadMethodCallException
Method Sunspikes\ClamavValidator\ClamavValidator::validateColorHex does not exist.
@TCURT15
Copy link

TCURT15 commented Dec 21, 2020

Having the same issue when I tried to create my own custom validation class using Validator::extend. The issue appears to be that clamav-validator is trying to resolve my custom validation method

@AlexanderWright
Copy link

Is there a solution to this, please?

@AlexanderWright
Copy link

For others with this issue, I added the package to Laravel's dont-discover section in composer.json, then used the following just before the validation code:

    // Register the AV validator manually to avoid clash.
    app()->register(\Sunspikes\ClamavValidator\ClamavValidatorServiceProvider::class);

@reosch
Copy link

reosch commented Oct 26, 2021

Same issue, using it with https://github.com/Intervention/validation will override all validations.

@AlexanderWright hack works but isn't really a solution.

Also will probably fail once you try to use validations together from both packages.

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

4 participants