diff --git a/src/InlineEntityForm/EntityInlineEntityFormHandler.php b/src/InlineEntityForm/EntityInlineEntityFormHandler.php
index 2c02b16..a96b800 100644
--- a/src/InlineEntityForm/EntityInlineEntityFormHandler.php
+++ b/src/InlineEntityForm/EntityInlineEntityFormHandler.php
@@ -288,6 +288,7 @@ class EntityInlineEntityFormHandler implements InlineEntityFormHandlerInterface
     $child_form_state->addBuildInfo('args', array());
 
     // Copy values to child form.
+    $child_form_state->setCompleteForm($form_state->getCompleteForm());
     $child_form_state->setUserInput($form_state->getUserInput());
     $child_form_state->setValues($form_state->getValues());
     $child_form_state->setStorage($form_state->getStorage());
diff --git a/src/Tests/InlineEntityFormComplexWebTest.php b/src/Tests/InlineEntityFormComplexWebTest.php
index 4dc889a..e3595c6 100644
--- a/src/Tests/InlineEntityFormComplexWebTest.php
+++ b/src/Tests/InlineEntityFormComplexWebTest.php
@@ -7,10 +7,6 @@
 
 namespace Drupal\inline_entity_form\Tests;
 
-use Drupal\node\Entity\Node;
-use Drupal\field\Entity\FieldConfig;
-use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Core\Entity\Entity\EntityFormDisplay;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -125,7 +121,17 @@ class InlineEntityFormComplexWebTest extends WebTestBase {
     $this->setAllowExisting(TRUE);
     $this->drupalGet($this->formContentAddUrl);
 
+    $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Add new node"]'));
+    $this->assertResponse(200, 'Opening new inline form was successful.');
+
+    $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Create node"]'));
+    $this->assertResponse(200, 'Submitting empty form was successful.');
+    $this->assertText('First name field is required.', 'Validation failed for empty "First name" field.');
+    $this->assertText('Last name field is required.', 'Validation failed for empty "Last name" field.');
+    $this->assertText('Title field is required.', 'Validation failed for empty "Title" field.');
+
     // Create ief_reference_type node in IEF.
+    $this->drupalGet($this->formContentAddUrl);
     $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Add new node"]'));
     $this->assertResponse(200, 'Opening new inline form was successful.');
 
@@ -145,13 +151,22 @@ class InlineEntityFormComplexWebTest extends WebTestBase {
     $this->assertTrue((bool) $this->xpath('//input[@type="submit" and @value="Edit"]'), 'Edit button appears in the table.');
     $this->assertTrue((bool) $this->xpath('//input[@type="submit" and @value="Remove"]'), 'Remove button appears in the table.');
 
+    // Test edit functionality.
+    $this->drupalPostAjaxForm(NULL, [], $this->getButtonName('//input[@type="submit" and @value="Edit"]'));
+    $edit = [
+      'multi[form][inline_entity_form][entities][0][form][title][0][value]' => 'Some changed reference',
+    ];
+    $this->drupalPostAjaxForm(NULL, $edit, $this->getButtonName('//input[@type="submit" and @value="Update node"]'));
+    $this->assertTrue((bool) $this->xpath('//td[@class="inline-entity-form-node-title" and ./span[contains(.,"Some changed reference")]]'), 'Node title field appears in the table');
+    $this->assertTrue((bool) $this->xpath('//td[@class="inline-entity-form-node-status" and ./div[contains(.,"Published")]]'), 'Node status field appears in the table');
+
     // Create ief_test_complex node.
     $edit = ['title[0][value]' => 'Some title'];
     $this->drupalPostForm(NULL, $edit, t('Save'));
     $this->assertResponse(200, 'Saving parent entity was successful.');
 
     // Checks values of created entities.
-    $node = $this->drupalGetNodeByTitle('Some reference');
+    $node = $this->drupalGetNodeByTitle('Some changed reference');
     $this->assertTrue($node, 'Created ief_reference_type node ' . $node->label());
     $this->assertTrue($node->get('first_name')->value == 'John', 'First name in reference node set to John');
     $this->assertTrue($node->get('last_name')->value == 'Doe', 'Last name in reference node set to Doe');
diff --git a/src/Tests/InlineEntityFormWebTest.php b/src/Tests/InlineEntityFormWebTest.php
index e87c8fc..050e838 100644
--- a/src/Tests/InlineEntityFormWebTest.php
+++ b/src/Tests/InlineEntityFormWebTest.php
@@ -6,6 +6,7 @@
  */
 
 namespace Drupal\inline_entity_form\Tests;
+
 use Drupal\simpletest\WebTestBase;
 
 /**
