#7082 closed (invalid)
newforms Multivalue.clean() strange behavior
Reported by: | leotr | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | newforms multivaluefield clean | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi!
I have a question about newforms MultiValueField.clean() method:
for i, field in enumerate(self.fields):
try:
field_value = value[i]
except IndexError:
field_value = None
if self.required and field_value in EMPTY_VALUES:
#
# |
# Why here is self.required? What if i allow some fields in
# some cases to be empty? Is it a bug and 'field.required'
# should be instead of 'self.required'?
#
Regards,
Leo Trubach
Change History (3)
comment:2 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 17 years ago
Support questions should be asked on the mailing list, not in Trac, please.