Validation failure wipes the multi field values when cardinality is set to unlimited

Created on 16 September 2022, almost 2 years ago
Updated 14 November 2023, 8 months ago

Problem/Motivation

When the multi field is set to unlimited cardinality and the validation fails for one of the fields, the form is reloaded only with values for the first row and the rest of the row values are wiped. This does NOT happen when there is a defined cardinality such as 3 or 5 for example.

Steps to reproduce

  1. Create a multi field form element with cardinality set to -1
  2. Assign two fields for it
  3. Set a custom validator for one of the fields
  4. Add a bunch of values, at least 2 or 3.
  5. Enter an invalid value to trigger the validation failure
  6. You will see that the multi field shows only the first set of values filled in and the rest aren't shown
🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

fathima.asmat London, UK

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024