src/Viserio/Component/Validation/Provider/ValidationServiceProvider.php
public static function createValidator(ContainerInterface $container): ValidatorContract
    {
        $validator = new Validator();

        // @codeCoverageIgnoreStart
        if ($container->has(TranslatorContract::class)) {
            $validator->setTranslator($container->get(TranslatorContract::class));
        }
        // @codeCoverageIgnoreEnd

        return $validator;
    }
public static function createValidator(ContainerInterface $container): ValidatorContract
    {
        $validator = new Validator();

        // @codeCoverageIgnoreStart
        if ($container->has(TranslatorContract::class)) {
            $validator->setTranslator($container->get(TranslatorContract::class));
        }
        // @codeCoverageIgnoreEnd

        return $validator;
    }
Create a validator instance.

@param \Psr\Container\ContainerInterface $container

@return \Viserio\Component\Contract\Validation\Validator