def validate_dict(field: str, field_content: Dict, is_non_tensor_field: bool, mappings: Dict,
                  index_model_dimensions: int = None, structured_field_type: FieldType = None,
                  marqo_index_version: semver.VersionInfo = None):
    """
    Args:
        field: the field name
        field_content: the field when it is a dict, especially used for multimodal tensor combination field
        structured_field_type: the type of the field (only for structured index).
        is_non_tensor_field: for multimodal tensor combination field, this should be True
        mappings: a dictionary to help validate the object field content
        index_model_dimensions: the dimensions of the model of the index. used to validate custom vector field.
        marqo_index_version: the version of the Marqo index
    Returns:
        Updated field_content dict or raise an error
    """
    marqo_index_version_lt_2_9_0 = marqo_index_version < semver.VersionInfo.parse("2.9.0")
    # If field is declared in mappings, it overwrites the default.
    if mappings and field in mappings:
        if mappings[field]["type"] == enums.MappingsObjectType.multimodal_combination:
            field_content = validate_multimodal_combination(field_content, is_non_tensor_field, mappings[field])
        elif mappings[field]["type"] == enums.MappingsObjectType.custom_vector:
            field_content = validate_custom_vector(field_content, is_non_tensor_field, index_model_dimensions)
        else:
            raise InvalidArgError(
                f"The field `{field}` is of invalid type in the `mappings` parameter. The only object field type supported "
                f"is `custom_vector`. However, the `mappings` provided is: {mappings}. Please change the "
                f"type of {field}. "
                f"See `{marqo_docs.mappings()}` for more info on object fields. "
            )
    else:
        # Use type declared in structured_field_type if not in mappings
        if structured_field_type:
            if structured_field_type == FieldType.MultimodalCombination:
                field_content = validate_multimodal_combination(field_content, is_non_tensor_field, mappings[field])
            elif structured_field_type == FieldType.CustomVector:
                field_content = validate_custom_vector(field_content, is_non_tensor_field, index_model_dimensions)
            elif structured_field_type in [FieldType.MapFloat, FieldType.MapInt, FieldType.MapDouble,
                                           FieldType.MapLong]:
                field_content = validate_map_numeric_field(field_content)
            else:
                raise InvalidArgError(
                    f"The field {field} is of type `{structured_field_type}`, which is not a valid object field type. "
                    f"The only object field type supported "
                    f"is `custom_vector`. Please change the type of {field} to use it as an object field. "
                    f"See `{marqo_docs.mappings()}` for more info on object fields. "
                )
        else:
            # Index is unstructured, check if it is a map numeric field
            if marqo_index_version_lt_2_9_0:
                raise InvalidArgError(
                    f"The field {field} is a map field and only supported for indexes created with Marqo 2.9.0 or later. "
                    f"See {marqo_docs.map_fields()} and {marqo_docs.mappings()}."
                )
            field_content = validate_map_numeric_field(field_content)

    return field_content

    Args:
        field: the field name
        field_content: the field when it is a dict, especially used for multimodal tensor combination field
        structured_field_type: the type of the field (only for structured index).
        is_non_tensor_field: for multimodal tensor combination field, this should be True
        mappings: a dictionary to help validate the object field content
        index_model_dimensions: the dimensions of the model of the index. used to validate custom vector field.
        marqo_index_version: the version of the Marqo index
    Returns:
        Updated field_content dict or raise an error
    
src/marqo/tensor_search/validation.py