private static function checkClass($validator)
    {
        if (! class_exists($validator)) {
            throw new InvalidArgumentException(
                "Class {$validator} does not exists."
            );
        }

        if (! is_subclass_of($validator, ValidatorInterface::class)) {
            throw new Exception\UnknownValidatorClassException(
                "The validator '{$validator}' is not defined or does not " .
                "implements the Slick\\Validator\\ValidatorInterface interface"
            );
        }

        return $validator;
    }