model_validator
No overview available.
def model_validator(
mode: Literal['after']
) - > Callable
Decorates a model method to perform validation either before or after the standard model validation process.
Parameters
| Name | Type | Description |
|---|---|---|
| mode | Literal['after'] | Specifies the validation timing; 'after' indicates the validator runs after the model has been initialized and field-level validation is complete. |
Returns
| Type | Description |
|---|---|
Callable | A decorator that wraps the validation function and attaches Pydantic-specific metadata for model processing. |