Opened 18 years ago
Closed 18 years ago
#2266 closed enhancement (fixed)
[patch] Form validator django.core.validators.RequiredIfOtherFieldsNotGiven does not exist
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | normal | Keywords: | form manipulator validator |
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
Although the validator class RequiredIfOtherFieldsNotGiven
is mentioned in the Form-fields and manipulators documentation, is doesn't actually exist in django.core.validators. The attached patch adds this class.
Attachments (3)
Change History (9)
by , 18 years ago
Attachment: | RequiredIfOtherFieldsNotGiven.diff added |
---|
comment:1 by , 18 years ago
Summary: | Form validator django.core.validators.RequiredIfOtherFieldsNotGiven does not exist → [patch] Form validator django.core.validators.RequiredIfOtherFieldsNotGiven does not exist |
---|
comment:2 by , 18 years ago
Attached updated patches against changeset 3445 (25-July-06)
Fixed:
RequiredIfOtherFieldsNotGiven - was documented but not implemented.
RequiredIfOtherFieldsGiven - was implemented but not documented.
RequiredIfOtherFieldGiven - was implemented but not documented.
Broke the compound conditions in the validators into separate if statements, because trying to figure out what anded nots in a loop were supposed to do was making my brain hurt.
Provided some doctests for these validators. (uploaded separately)
Finally, the documented behaviour of RequiredIfOtherFieldsNotGiven was a little odd. Whereas the validator used to require a value if any of the other fields was not given, it now requires a value only when none of the other fields is given. Since the validator was not implemented previously, this is not a breaking change.
comment:3 by , 18 years ago
The Django docs don't mention the current RequiredIfOtherFieldGiven and RequiredIfOtherFieldsGiven validators.
comment:5 by , 18 years ago
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The validator framework is deprecated functionality at this point, so we aren't adding any more features to it. What I've done is removed the documentation for the non-existed RequiredIfOtherFieldsNotGiven and merged in alang's documentation for RequiredIfOtherField[s]Given.
Patch to add RequiredIfOtherFieldsNotGiven to django.core.validators