refer_to_missing_field
Generates a list containing a Django validation error indicating that a specified option refers to a field that does not exist on the model.
def refer_to_missing_field(
field: string,
option: string,
obj: object,
id: string
) - > list
Generates a validation error message when a configuration option refers to a field name that does not exist on the target model.
Parameters
| Name | Type | Description |
|---|---|---|
| field | string | The name of the field that was expected but not found on the model. |
| option | string | The name of the configuration option or attribute that contains the invalid field reference. |
| obj | object | The object instance being checked, used to retrieve the model metadata and class type. |
| id | string | A unique identifier for the validation error, typically following the Django check framework naming convention. |
Returns
| Type | Description |
|---|---|
list | A list containing a Django validation error object detailing the missing field and the model label. |