def validate_pack_name(name):
    """
    Validate the content pack name.

    Throws Exception on invalid name.

    :param name: Content pack name to validate.
    :type name: ``str``

    :rtype: ``str``
    """
    if not name:
        raise ValueError("Content pack name cannot be empty")

    if name.lower() in USER_PACK_NAME_BLACKLIST:
        raise ValueError('Name "%s" is blacklisted and can\'t be used' % (name.lower()))

    return name

    Validate the content pack name.

    Throws Exception on invalid name.

    :param name: Content pack name to validate.
    :type name: ``str``

    :rtype: ``str``
    
st2common/st2common/content/validators.py