I have an entity that contains an Inline Entity Form. I need to validate a "deadline" date field in the inline entity to ensure it isn't past an "overall deadline" field in the parent entity.

Using the "Add New Entity" button opens an inline entity creation form, as expected. However, saving the parent form without saving or cancelling the inline creation form causes the inline entity to be automatically created, bypassing parent form validation and thus permitting erroneous field values.

Expected Result:
When the parent form is saved, if an inline entity is pending creation, but hasn't been saved or cancelled by the user, it should either automatically cancel creation or throw a form error to allow the user to decide whether to create or cancel the pending inline entity.

*This is my first time reporting a bug, so let me know if I'm missing any required information in my report.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kigorian created an issue. See original summary.

nagendra.531’s picture

Assigned: Unassigned » nagendra.531
Status: Active » Needs review
FileSize
829 bytes

Showing validation errors if the child entity fields has not passed validations on saving the parent form.

darvanen’s picture

Can you provide steps to reproduce or a fail patch to assist review?

bojanz’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Needs a test.