Deleting the first value in a required, multivalue field fails validation

Created on 7 November 2006, over 18 years ago
Updated 25 February 2023, about 2 years ago

Steps to reproduce :
(1 to 5 are just there to outline the 'expected' behaviour)
1 - Define a text field - mark it multiple / NOT required
2 - Create a node with 3 values 'foo', 'bar' and 'baz' for the field
3 - Submit
4 - Edit the node, empty the first value 'foo'
5 - Submit : everything OK, the field has the values 'bar' and 'baz', and if you edit the node, you get 'bar' and 'baz' in the first and second textfields (values have shifted)
6 - Now set your field to REQUIRED
7 - Edit the node, empty the first value 'bar'
8 - Submit : you get a 'field is required' error on the first (empty) textfield, yet the field itself should not be considered empty, since you have the 'baz' value in the second textfield

This is content.module stuff - you get the behaviour with number, or noderef with autocomplete fields.

πŸ› Bug report
Status

Closed: duplicate

Version

8.9 ⚰️

Component
FieldΒ  β†’

Last updated about 7 hours ago

Created by

πŸ‡«πŸ‡·France yched

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡ΈUnited States brad.bulger

    The issue that this is marked as a duplicate of is not really this same problem. It is about a UI widget to let users remove items from a multiple value field. I added a new issue πŸ› Improve required validation of multiple value fields Active that is about improving 'required' validation of multiple value fields, to consider the field as a whole instead of only delta 0 in whatever position it might be.

Production build 0.71.5 2024