Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a field is configured to contain multiple values the form validation will cast an exception. This is because the $values array also contains an entry of the "add more" button which is an object and not an array.
Also if you try to save a user again it will not let you as a unique value is found although that value lives on the user being saved.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2854807_2_unique_field_multivalue.patch | 7.3 KB | ChristianEsbensen |
Comments
Comment #2
ChristianEsbensen CreditAttribution: ChristianEsbensen at Adapt commentedI have created a patch for this that supports multivalue fields. Also updated the error message so it lists which values that are invalid. Lastly I've fixed resave of user.
Comment #3
ChristianEsbensen CreditAttribution: ChristianEsbensen at Adapt commentedComment #5
sidheswar CreditAttribution: sidheswar commentedThanks @ChristianEsbensen. I have made the changes as per your post.
Comment #6
sidheswar CreditAttribution: sidheswar commented