def validate_password(password: str):
    """ Validate the user password

    >>> validate_password("short")
    Traceback (most recent call last):
    ...
        raise ValueError("password must have at least 8 characters")
    ValueError: password must have at least 8 characters
    >>> validate_password("This is a good password!")
    'This is a good password!'
    """
    minlen = 8
    if not isinstance(password, str):
        raise TypeError("password must be a string")
    if len(password) < minlen:
        raise ValueError("password must have at least 8 characters")
    return password