summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2010-01-01 21:11:57 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2010-01-01 21:11:57 +0000
commita907e15cad3ede93f8b785007bdf93205b4f431a (patch)
tree42f912d059aae461aa9c70ca4201174c801a022e /docs
parentc2a2b51ac3009739813a7e6ba22f3c7053a30da2 (diff)
[soc2009/model-validation] Renamed Model's clean method to full_validate to be more consistent with django.forms.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/instances.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index ee5a607ff4..3f61d729ff 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -32,9 +32,9 @@ Validating objects
.. versionadded:: 1.2
-To validate your model, just call it's ``clean()`` method:
+To validate your model, just call it's ``full_validate()`` method:
-.. method:: Model.clean([exclude=[]])
+.. method:: Model.full_validate([exclude=[]])
The optional ``exclude`` argument can contain a list of field names that should
be omitted when validating. This method raises ``ValidationError`` containing a
@@ -45,8 +45,9 @@ To add your own validation logic, override the supplied ``validate()`` method:
.. method:: Model.validate()
The ``validate()`` method on ``Model`` by default checks for uniqueness of
-fields and group of fields that are declared to be unique so remember to call
-``super.validate()`` if you want this validation to run.
+fields and group of fields that are declared to be unique so, remember to call
+``self.validate_unique()`` or the superclasses ``validate`` method if you want
+this validation to run.
Any ``ValidationError`` raised in this method will be propagated in the
``message_dict`` under ``NON_FIELD_ERRORS``.