bug: #3619935: Untriggered dependents with validation errors are excluded from error removal

dependentValidate() returned as soon as it found validation errors on an untriggered dependent, so that dependent was never added to conditional_fields_untriggered_dependents and formValidate(), which only acts on registered dependents, had nothing to remove those errors from. A dependent that is required at field level always lands in that branch, because core raises the required error on a descendant element before dependentValidate() runs on the field element, so such a dependent is only ever seen with errors already attached. This MR drops the early return and keeps the collected errors in the form state addition, which is all formValidate() needs, since it already merges $field['errors'] into the set it removes. The new Functional test covers both directions: an untriggered required dependent no longer blocks the submission, and a triggered one is still validated. On 4.x at 48be41ce with Drupal 11.4.7, PHP 8.4 and PostgreSQL 18 the untriggered case fails without the change and passes with it, while the module's Unit, Kernel and Functional suites stay green.

Closes #3619935

Merge request reports

Loading
Loading