So I installed this package https://packagist.org/packages/illuminate/validation into my project with the command composer require illuminate/validation where you get a stand-alone version of Laravels validator. Then when I tried to use it like the docs say you should https://laravel.com/docs/8.x/validation and try to implement it like this
$validated = Validator::make($data, [
'token' => 'required',
'email' => 'required',
'password' => 'required',
])->validate();
I get an 'message' => 'A facade root has not been set.', also this is the $data object
array (
'token' => 'c11019348c3876f033603a0d0030ad3f0c9ec7d7ae211a49',
'email' => 'ewaeaw',
'password' => 'ewaeaw',
),
so do I need to invoke the library somewhere or what am I'm doing wrong cause the Github readme of the package just says https://github.com/illuminate/validation [READ ONLY] Subtree split of the Illuminate Validation component (see laravel/framework) so what steps am I missing so it works fine so that I can implement it into my project
I also have looked into this Fail to make Laravel 4's Validator class work outside the framework it says you can implement it with this line $factory = new \Illuminate\Validation\Factory(new \Symfony\Component\Translation\Translator('en'));
but the class \Illuminate\Validation\Factory doesn't exist anymore. cause the namespace is Illuminate\Support\Facades\Validator prob cause it 9 years old? so some one has any up to date method of doing this? also looking at the vendor map there doesn't exist any factory class inside the Facades folder