def validate_overrides(data: TypeOverrides,
                       config_model: Dict) -> None:
    """
    Check that override fields are valid.

    :param data: a dict of field name to value
    :param config_model: the configuration for the chosen model
    :raises ValueError: If a value is invalid
    """
    for key, value in data.items():
        field_config = config_model.get(key)
        is_quirk = key in config_model['quirks']

        if is_quirk:
            # If it's a quirk it must be a bool or None
            if value is not None and not isinstance(value, bool):
                raise ValueError(f'{value} is invalid for {key}')
        elif not field_config:
            # If it's not a quirk we must have a field config
            raise ValueError(f'Unknown field {key}')
        elif value is not None:
            # If value is not None it must be numeric and between min and max
            if not isinstance(value, numbers.Number):
                raise ValueError(f'{value} is invalid for {key}')
            elif value < field_config['min'] or value > field_config['max']:
                raise ValueError(f'{key} out of range with {value}')