Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7428 closed (fixed)

clean_<fieldname>() docs don't tell you what to do once you've verified the data is valid.

Reported by: mueen@… Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: custom validation cleaned
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The custom validation docs for clean_<fieldname>() should point out that once you're done validating the data, it should return the cleaned data. It's not obvious that the method should have a return value.

(Additionally, a minor suggestion - perhaps you should refer to it as clean_<fieldname>(self). The current text could be confused to imply that self need not be added as an argument).

Change History (4)

comment:1 by Jeff Anderson, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by James Bennett, 16 years ago

#8057 was a duplicate, and has a patch.

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [9177]) Added a lot more explanation about form field validation, including expanded
examples. Fixed #5843, #6652, #7428.

comment:4 by Malcolm Tredinnick, 16 years ago

(In [9180]) [1.0.X] Added a lot more explanation about form field validation, including
expanded examples. Fixed #5843, #6652, #7428.

Backport of r9177 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top