Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#13342 closed (wontfix)

MultiValueField - incorrectly use 'required' attribute of MultiValueField for child field validation — at Version 1

Reported by: krejcik Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords: fields required MultiValueField
Cc: flisky Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Russell Keith-Magee)

MultiValueField is composed from several child fields
Validation logic in it's clean method should be:

  • if MultiValueField is required, at least one of the child values must be non-empty (ok)
  • if a child field is required, it's value must be non-empty (bug in implementation, MultiValueField.required is used instead of child.required to check condition)
  • clean decompressed values by each child fields and compress together (ok)

Change History (2)

by krejcik, 14 years ago

Attachment: fields.patch added

comment:1 by Russell Keith-Magee, 14 years ago

Description: modified (diff)
milestone: 1.2
Resolution: wontfix
Status: newclosed

The proposed behavior strikes me as a fairly major change to the existing behavior, but it isn't clear to me that the existing behaviour is wrong, or that the proposed behavior is more correct.

The report and patch doesn't give any test cases to validate why the proposed change would be correct, so I'm closing wontfix. If you want to argue your case, please bring it up on Django-developers.

Regardless of the decision, the ticket isn't 1.2 critical.

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