public static function registerValidator($type, $className)
    {
        if (!is_string($type)) {
            throw new \Exception('"type" MUST be string');
        }

        if (!is_string($className)) {
            throw new \Exception('"className" MUST be string');
        }

        if (!is_subclass_of(
            $className,
            BaseValidator::class,
            true
        )) {
            throw new \Exception(sprintf(
                '"className" MUST extend "%s"',
                BaseValidator::class
            ));
        }

        self::$validatorRegistry[$type] = $className;
    }