ComboField
A Field whose clean() method calls multiple Field clean() methods.
Attributes
| Attribute | Type | Description |
|---|---|---|
| fields | list | A list of Field instances used to sequentially validate and clean the input value. |
Constructor
Signature
def ComboField(
fields: list,
**kwargs: dict
)
Parameters
| Name | Type | Description |
|---|---|---|
| fields | list | A list of Field instances to be used for validation. |
| **kwargs | dict | Additional keyword arguments passed to the parent Field class. |
Signature
def ComboField(
fields: list,
**kwargs: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| fields | list | A list of Field instances that will be used sequentially to validate the input value. |
| **kwargs | dict | Additional keyword arguments passed to the parent Field constructor, such as label or help_text. |
Methods
clean()
@classmethod
def clean(
value: any
) - > any
Validate the given value against all of self.fields, which is a list of Field instances.
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The raw input value to be validated and transformed by the sequence of internal fields. |
Returns
| Type | Description |
|---|---|
any | The cleaned and validated value after it has been processed by every field in the sequence. |