Should mention to call parent clean method for modelForm in custom validation chapter
|Reported by:||fgaudin||Owned by:||ptone|
|Severity:||Keywords:||ModelForm, validation, clean|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.
Change History (6)
comment:1 Changed 6 years ago by russellm
- milestone set to 1.2
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted