Opened 10 years ago

Last modified 7 years ago

#13342 closed

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

Reported by: krejcik Owned by: nobody
Component: Forms Version: master
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


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 (1)

Changed 10 years ago by krejcik

Attachment: fields.patch added
Note: See TracTickets for help on using tickets.
Back to Top