public static function validate($type, $paramName, $data, array $params = [])
    {
        $data = (array) $data;
        switch ($type) {
            case self::VALIDATOR_USER:
                return static::validateByCallback($paramName, $data, $params);
            case self::VALIDATOR_EMAIL:
                return static::validateEmail($paramName, $data);
            case self::VALIDATOR_LENGTH:
                return static::validateLength($paramName, $data, $params);
            case self::VALIDATOR_EQUAL:
                return static::validateEquality($paramName, $data, $params);
            default:
                throw new \Exception('Unknown validator');
        }
    }