Pydantic · Decorator
model_validator
model_validator() validates data for the complete Pydantic model. Its mode controls whether the check runs before validation, after validation, or around the validation process.
Last updated
Syntax
@model_validator(mode='before' | 'after' | 'wrap')In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
field_validator()BeforeValidatorAfterValidatorWrapValidator