Opened 10 years ago

Closed 10 years ago

#4386 closed (duplicate)

docs/newforms.txt: Explain custom cleaning/validation

Reported by: Thomas Güttler <hv@…> Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Hi,

here is a patch to document he custom cleaning method clean_FIELDNAME()

Attachments (1)

newforms-cleanmethod.diff (1009 bytes) - added by Thomas Güttler <hv@…> 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Thomas Güttler <hv@…>

Attachment: newforms-cleanmethod.diff added

comment:1 Changed 10 years ago by Gary Wilson <gary.wilson@…>

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

By the time clean_first_name gets called, you can access the value in cleaned_data:

value = self.cleaned_data['first_name']

but this could change slightly if #4391 gets fixed.

comment:2 Changed 10 years ago by Malcolm Tredinnick

Resolution: duplicate
Status: newclosed

Thanks, Thomas. I'll combine an example like yours with #4473 (which discusses the whole cleaning process) when I apply that.

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