I am using the rule object from Laravel 8
artisan make:rule RequireBetweenOf
See https://laravel.com/docs/8.x/validation#using-rule-objects
How do I access other fields or the validator?
I need to check other data in the validator.
I know how it works for for Validator::extend() as 4. parameter but that does not work for Illuminate\Contracts\Validation\Rule. I have also seen that there is a answer using request(). But that is a hack, because validator data and request might not be the same. There might be no request at all.