Minimum items not respected when multi-value element is required

Created on 13 March 2025, about 1 month ago

Problem/Motivation

When an element that accepts multiple values is required. The minimum number of items configuration under Advanced>>Multiple Settings>>Minimum amount of items is not respected.

Steps to reproduce

  1. Create a webform.
  2. Add a textfield element.
  3. Set Allowed number of values to Unlimited or something more than 1.
  4. Set it to be required
  5. Set the minimum number of items under Advanced>>Multiple Settings>>Minimum amount of items to be 2.
  6. Save element and form
  7. Test the form add 2 values, but clear (empty) the 2nd one and submit. It's able to submit with no errors.

Proposed resolution

Ensure webform validates the minimum number of items when a multi-value element is required.

πŸ› Bug report
Status

Active

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States hablat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024