Skip to content

Commit

Permalink
Add Model.validate_constraints (typeddjango#199)
Browse files Browse the repository at this point in the history
New in Django 4.1
  • Loading branch information
georgek committed Oct 11, 2023
1 parent 72e4deb commit 06da6da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django-stubs/db/models/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 06da6da

Please sign in to comment.