Paragraphs widgets validates fields that are not in the current form display

Created on 27 June 2017, about 7 years ago
Updated 22 January 2024, 5 months ago

The widget form code for "Validate closed paragraphs and expand if needed." checks all fields on the paragraph and does not limit validation to the fields in the form display.

When the paragraphs widget validates a "closing" form, then it does not highlight any field and shows errors messages that are confusing to editors "This value should not be null.".

Proposed:
1. Allow the widget elementValidate() to flag the errors on the widget forms as it normally would. This provides human understandable error messages and highlights the field.
FIX to implement: Update collapse_button to limit validation to the field item.

2. Keep on form build validation for "" in case there is some edge case that is it still needed.
FIX to implement: Update code to check for a field widget similar to EntityFormDisplay::flagWidgetsErrorsFromViolations().

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States recrit

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

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