0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Documentation -- Corrected error about Model.full_clean()

Although the ModelForm validation code was changed to call
Model.full_clean(), the documentation still said otherwise. The
offending phrase was removed.
This commit is contained in:
Kevin Christopher Henry 2013-08-21 15:38:07 -04:00
parent 0073f1d94f
commit bb011cf809

View File

@ -104,14 +104,9 @@ aren't present on your form from being validated since any errors raised could
not be corrected by the user.
Note that ``full_clean()`` will *not* be called automatically when you call
your model's :meth:`~Model.save()` method, nor as a result of
:class:`~django.forms.ModelForm` validation. In the case of
:class:`~django.forms.ModelForm` validation, :meth:`Model.clean_fields()`,
:meth:`Model.clean()`, and :meth:`Model.validate_unique()` are all called
individually.
You'll need to call ``full_clean`` manually when you want to run one-step model
validation for your own manually created models. For example::
your model's :meth:`~Model.save()` method. You'll need to call it manually
when you want to run one-step model validation for your own manually created
models. For example::
from django.core.exceptions import ValidationError
try: