Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #21942 -- Added missing documentation of Form.clean() to API #2318

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
3 participants
@lynnkitch
Copy link

commented Feb 18, 2014

Fixed 21942 -- Added missing documentation of Form.clean() to API

@@ -71,6 +71,85 @@ should consider its data immutable, whether it has data or not.
Using forms to validate data
----------------------------

.. method:: Form.clean()

Suppose we add another requirement to our contact form: if the ``cc_myself``

This comment has been minimized.

Copy link
@timgraham

timgraham Feb 18, 2014

Member

We should include a brief overview of Form.clean() here, not simply copy all the text from the topic guide.

self.add_error('subject', msg)

The second argument of ``add_error()`` can be a simple string, or preferably
an instance of ``ValidationError``. See :ref:`raising-validation-error` and :ref:`cleaning-and-validating-fields-that-depend-on-each-other` for more information . Note that ``add_error()` automatically removes the field

This comment has been minimized.

Copy link
@timgraham

timgraham Feb 18, 2014

Member

Please wrap text at 80 characters. You also need a newline after this paragraph before the next section.

@timgraham

This comment has been minimized.

Copy link
Member

commented Feb 18, 2014

The commit message is missing a number sign before the ticket number.

@@ -71,6 +71,85 @@ should consider its data immutable, whether it has data or not.
Using forms to validate data
----------------------------

.. method:: Form.clean()

This comment has been minimized.

Copy link
@cjerdonek

cjerdonek Feb 18, 2014

Contributor

Now that this is part of the API, it would be good to hyperlink a couple of the main occurrences in the text to this documentation, for example the first occurrence on this page and this page (search for clean()).

@timgraham

This comment has been minimized.

Copy link
Member

commented Feb 20, 2014

Replaced by #2334

@timgraham timgraham closed this Feb 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.