#12643 closed (fixed)
Should mention to call parent clean method for modelForm in custom validation chapter
Reported by: | fgaudin | Owned by: | Preston Holmes |
---|---|---|---|
Component: | Documentation | Version: | 1.1 |
Severity: | Keywords: | ModelForm, validation, clean | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I and some collegues always refer to http://docs.djangoproject.com/en/1.1/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other to check how to do custom validation, I've been looking for a while before finding that I need to call the parent clean method for modelForm (to avoid postgres to raise the unique constraint error).
I found later that it was written in ModelForm documentation. Just a warning with a link to this chapter would be great.
Attachments (1)
Change History (6)
comment:1 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 15 years ago
Attachment: | 12833.diff added |
---|
comment:2 by , 15 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
comment:3 by , 15 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I inserted the note and link where it seemed most appropriate in the introduction to the clean method - I couldn't figure out if there is a way to link to a #section, and couldn't find any example of such a ref after a quick look around the docs.