def validate_image(in_data):
    """ Validates data received from client

    Validates the input data to make sure it's formatted as expected.

    Args:
        in_data (dictionary): the request.json in_Data from the client

    Returns:
        errorCode (int): server error code
        errorStatement (str): error message
    """
    errorCode = 200
    errorStatement = None
    try:
        in_data["client"]
        in_data["image"]
        in_data["user"]
        in_data["img_grp"]
        in_data["batch"]
        in_data["location"]
        in_data["filename"]
    except KeyError:
        errorCode = 400
        errorStatement = "Missing data from client."
        return errorCode, errorStatement
    for key in in_data:
        value = in_data[key]
        if type(value) != str:
            errorCode = 406
            errorStatement = "Bad (non-string) data from client."
    return errorCode, errorStatement