def validate_post_input(in_data, expected_key, expected_types):
    """Validate the post input

    Validate if the posted input has all the required keys.Or if the input
    information has the correct datatype. If not send a warning from the server
    to the client.

    Args:
        in_data (dict): The post input information
        expected_key: The keys should exist in the input dictionary
        expected_types (type): The expected type of the corresponding
        key values

    Returns:
        True or str: indicate if the posted input meets with the requirements

    """
    for key, v_type in zip(expected_key, expected_types):
        if key not in in_data.keys():
            return "{} key not found in input".format(key)
        if type(in_data[key]) != v_type:
            return "{} key value has wrong variable type".format(key)
    return True