Create own rules for Laravel validator

Code
<?php

use Illuminate\Validation\Validator;
use 
Illuminate\Translation\Translator;
use 
Illuminate\Translation\FileLoader;
use 
Illuminate\Filesystem\Filesystem;

$filesystem = new Filesystem();
$loader = new FileLoader($filesystem'');
$translator = new Translator($loader'us');

// custom validator rule called "starts"
$customRules = [
    
'starts' => function($attribute$value$parameters) {
        return 
=== strpos($valuearray_shift($parameters));
    }
];

$data = [
    
'name' => 'John',
];

$rules = [
    
'name' => 'starts:Jo',
];

$validator = new Validator(
    
$translator,
    
$data,
    
$rules
);
$validator->addExtensions($customRules);

// does attribute "name" value starts with "Jo"?
$hasPassed $validator->passes();

dump($hasPassed);
Result
^ true
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8