root_validator
No overview available.
def root_validator(
pre: Literal[True],
allow_reuse: bool = ...
) - > Callable
Decorates a function to perform validation on the entire data dictionary before or after individual field validation.
Parameters
| Name | Type | Description |
|---|---|---|
| pre | Literal[True] | When set to True, indicates the validator should run before any field-level validation or type coercion occurs. |
| allow_reuse | bool = ... | Whether to allow multiple models to share the same validator function without raising an error. |
Returns
| Type | Description |
|---|---|
Callable | A decorator that wraps the provided validation function and registers it within the Pydantic model's validation pipeline. |