Pydantic · Class
ValidateAs
ValidateAs lets Pydantic validate input with a supported type and then build a custom type from the validated result.
Last updated
Syntax
ValidateAs(from_type, instantiation_hook)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
AnnotatedTypeAdapterBaseModel