Opened 7 years ago

Closed 6 years ago

Last modified 6 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: master
Severity: Keywords: custom validation cleaned
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 Changed 7 years ago by programmerq

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ubernostrum

#8057 was a duplicate, and has a patch.

comment:3 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 6 years ago by mtredinnick

(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