From 06da6da7fce4d8bc944e74b403e470ee1eacb57e Mon Sep 17 00:00:00 2001 From: George Kettleborough Date: Wed, 11 Oct 2023 22:34:22 +0100 Subject: [PATCH] Add Model.validate_constraints (#199) New in Django 4.1 --- django-stubs/db/models/base.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/django-stubs/db/models/base.pyi b/django-stubs/db/models/base.pyi index 8e2b03454..6970a54b4 100644 --- a/django-stubs/db/models/base.pyi +++ b/django-stubs/db/models/base.pyi @@ -45,12 +45,13 @@ class Model(metaclass=ModelBase): def full_clean( self, exclude: Collection[str] | None = ..., - validate_unique: bool = True, - validate_constraints: bool = True, + validate_unique: bool = ..., + validate_constraints: bool = ..., ) -> None: ... def clean(self) -> None: ... def clean_fields(self, exclude: Collection[str] | None = ...) -> None: ... def validate_unique(self, exclude: Collection[str] | None = ...) -> None: ... + def validate_constraints(self, exclude: Collection[str] | None = ...) -> None: ... def unique_error_message( self, model_class: type[Self],