def validate_credentials(src, dst):
    """
    Validate all user-specified credentials.

    Raises an error and stops processing if the credentials are not valid.

    :param str src: The user supplied Stormpath source credentials.
    :param str dst: The user supplied Stormpath destination credentials.
    :raises: ValueError on invalid credentials.
    """
    for val in [src, dst]:
        if len(val.split(':')) != 2:
            raise ValueError(
                'Invalid credentials specified. Use <id:secret> format.')
        id, secret = val.split(':')
        if len(id) == 0 or len(secret) == 0:
            raise ValueError(
                'Invalid credentials specified. Use <id:secret> format.')
