Skip to content

Using @model_validator with mode='after' on a classmethod is deprecated #2713

@fubuloubu

Description

@fubuloubu

Started noticing these warnings in my test runs as of Pydantic 2.12 release:

PydanticDeprecatedSince212: Using @model_validator with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.12/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.

@model_validator(mode="after")

@model_validator(mode="after")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions