Improve error messages on required fields when they're hidden by Javascript states

Created on 3 January 2024, 6 months ago
Updated 4 January 2024, 6 months ago

Problem/Motivation

πŸ› Regression from #3341682: #states + #required do not automatically work together, resulting in an unsubmittable AccountSettingsForm Fixed revealed that a required field hidden by #state isn't visible to the user so it's not clear what is wrong to the user.

Steps to reproduce

Install umami
Visit en/admin/config/people/accounts
In the 'Account activation' tab, empty the subject field and then untick 'Notify user when account is activated'
Save the form and note the error message 'This value should not be blank' but observe that neither the vertical tab or the invalid field can be easily found.

Proposed resolution

If a field is invalid, but hidden by #states, make it visible

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
JavascriptΒ  β†’

Last updated about 7 hours ago

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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

Production build 0.69.0 2024