Client-side-validation broken with Chosen

Created on 3 January 2020, over 4 years ago
Updated 18 December 2023, 7 months ago

This is a duplicate of the Drupal 8 issue which is marked as closed/fixed, but the problem also exists in Drupal 7.

There is a known issue with the Chosen library where it breaks this (https://github.com/harvesthq/chosen/issues/2075), which hasn't been fixed, but includes workarounds.

To reproduce, add a required multi-select field to a content type. Fill out all other required fields on the node add form. The form will not submit, but no direction is given to the user.

In Chrome, the user gets no feedback, and this error appears in the console log:

An invalid form control with name='field_test[]' is not focusable.
In Firefox, the message appears at the top of the browser window, rather than by the element:

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jenlampton

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.

Production build 0.69.0 2024