How to use two packages using Illuminate Contracts Validation Validator

Asked

Viewed 45 times

0

In my project I have two packages LaravelLegends/pt-br-validator and nuwave/lighthouse both use the Agreement Illuminate\Contracts\Validation\Validator to validate the fields, I would like to know if it is possible to use both in the same project?

Currently the Lighthouse is writing over the en-Validator and returning this error: "Method Illuminate\Validation\Validator::validateTelefone does not exist."

  • Could it be the syntax? some Apis use en others pt_br others pt-BR and others pt_BR

  • Opa @Vitorceolin worse than not, I saw here that the laravellegends/pt-br-validator and the nuwave/lighthouse both use the Agreement Validator and how the Lighthouse this being executed later ends up overwriting the en-Validator

  • Creates an Issue in the repositories of more packages warning of the problem, they should fix or suggest a solution, even if temporary

  • @Costamilam will do just that!! for now I managed to find a palliative solution for this, but I had to get rid of the Ptbrvalidator project.

  • @Thiagocosta in the current version of Lighthouse did not identify any use of Illuminate\Contracts\Validation\Validator which overrides the rules of the other package. Which versions of Laravel and the packages you are using?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.