summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-07-18 12:56:25 +0200
committerGitHub <noreply@github.com>2019-07-18 12:56:25 +0200
commit230d75f59c43b9731465c4ec92ad714e301637b8 (patch)
tree3a5ff6d4037786fe4109c836618f83551d15360e /docs
parenta3417282ac0464a9a2d1d7685bcfef10feed2597 (diff)
Refs #30547 -- Clarified that partial UniqueConstraints don't affect model validation.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/constraints.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/ref/models/constraints.txt b/docs/ref/models/constraints.txt
index b5b77b8654..f6d1842c14 100644
--- a/docs/ref/models/constraints.txt
+++ b/docs/ref/models/constraints.txt
@@ -35,11 +35,12 @@ option.
In general constraints are **not** checked during ``full_clean()``, and do
not raise ``ValidationError``\s. Rather you'll get a database integrity
- error on ``save()``. ``UniqueConstraint``\s are different in this regard,
- in that they leverage the existing ``validate_unique()`` logic, and thus
- enable two-stage validation. In addition to ``IntegrityError`` on
- ``save()``, ``ValidationError`` is also raised during model validation when
- the ``UniqueConstraint`` is violated.
+ error on ``save()``. ``UniqueConstraint``\s without a
+ :attr:`~UniqueConstraint.condition` (i.e. non-partial unique constraints)
+ are different in this regard, in that they leverage the existing
+ ``validate_unique()`` logic, and thus enable two-stage validation. In
+ addition to ``IntegrityError`` on ``save()``, ``ValidationError`` is also
+ raised during model validation when the ``UniqueConstraint`` is violated.
``CheckConstraint``
===================