Problem/Motivation

Inline entity form widgets that rely on `required_api` lose their validation state when child entities fail required field checks. The module’s form error handler removes messages keyed by inline entity form elements (`inline_entity_form`, `ief_*`), so the nested entity form closes and the parent saves with missing required data.

Proposed resolution

Update `RequiredApiFormErrorHandler::handleFormErrors()` to skip clearing error entries whose keys contain `inline_entity_form` or `ief_`. This preserves validation failures generated by inline entity form submissions, keeping the child form open with its error message and preventing invalid entities from being saved. I attach patch with this fix.

CommentFileSizeAuthor
keep-ief-validation-errors.patch878 bytespablo_pukha

Comments

pablo_pukha created an issue.

dieterholvoet’s picture

Could you test the MR from #3549912: RequiredApiRecursiveValidator discards violations triggered by regular constraints first? We have been discarding too many constraint violations and that issue aims to fix that, without handling Inline Entity Form specifically. If that were to fix your problem as well, that would be even better.