diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php
index 575daf9..9951673 100644
--- a/core/lib/Drupal/Core/Field/WidgetBase.php
+++ b/core/lib/Drupal/Core/Field/WidgetBase.php
@@ -425,7 +425,6 @@ public function flagErrors(FieldItemListInterface $items, ConstraintViolationLis
           $property_path = explode('.', $violation->getPropertyPath());
           $delta = array_shift($property_path);
           $violations_by_delta[$delta][] = $violation;
-          $violation->arrayPropertyPath = $property_path;
         }
 
         /** @var \Symfony\Component\Validator\ConstraintViolationInterface[] $delta_violations */
@@ -442,7 +441,6 @@ public function flagErrors(FieldItemListInterface $items, ConstraintViolationLis
             $delta_element = $element[$original_delta];
           }
           foreach ($delta_violations as $violation) {
-            // @todo: Pass $violation->arrayPropertyPath as property path.
             $error_element = $this->errorElement($delta_element, $violation, $form, $form_state);
             if ($error_element !== FALSE) {
               $form_state->setError($error_element, $violation->getMessage());
@@ -500,10 +498,25 @@ public function settingsSummary() {
   }
 
   /**
+   * Returns an array containing the path to the flagged sub-element.
+   *
+   * @param \Symfony\Component\Validator\ConstraintViolationInterface $violation
+   *   A constraint violation reported during the validation phase.
+   *
+   * @return array
+   *   The array containing the path.
+   */
+  protected function getLocalErrorPath(ConstraintViolationInterface $violation) {
+    return array_filter(explode('.', $violation->getPropertyPath()));
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function errorElement(array $element, ConstraintViolationInterface $error, array $form, FormStateInterface $form_state) {
-    return $element;
+    $error_path = $this->getLocalErrorPath($error);
+    $nested_element =  NestedArray::getValue($element, $error_path);
+    return is_array($nested_element) ? $nested_element : FALSE;
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Validation/WidgetBaseErrorElementTest.php b/core/modules/system/src/Tests/Validation/WidgetBaseErrorElementTest.php
new file mode 100644
index 0000000..85e0466
--- /dev/null
+++ b/core/modules/system/src/Tests/Validation/WidgetBaseErrorElementTest.php
@@ -0,0 +1,226 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\system\Tests\Validation\WidgetBaseErrorElementTest.
+ */
+
+namespace Drupal\system\Tests\Validation;
+
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\Core\Entity\Entity\EntityFormDisplay;
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests the validation violation property paths.
+ *
+ * @group Validation
+ */
+class WidgetBaseErrorElementTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'system',
+    'language',
+    'user',
+    'node',
+    'widgetbase_error_element_test',
+  ];
+
+  /**
+   * User with permission to administer entites.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * Entity form display.
+   *
+   * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface
+   */
+  protected $formDisplay;
+
+  /**
+   * URL to add new content.
+   *
+   * @var string
+   */
+  protected $formContentAddUrl;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->drupalCreateContentType(['type' => 'article']);
+    $this->adminUser = $this->drupalCreateUser([
+      'create article content',
+      'edit own article content',
+      'administer content types',
+    ]);
+    $this->drupalLogin($this->adminUser);
+
+    // Set article's form display.
+    $this->formDisplay = EntityFormDisplay::load('node.article.default');
+    if (!$this->formDisplay) {
+      $this->formDisplay = EntityFormDisplay::create([
+        'targetEntityType' => 'node',
+        'bundle' => 'article',
+        'mode' => 'default',
+        'status' => TRUE,
+      ])->save();
+    }
+
+    $this->formContentAddUrl = 'node/add/article';
+
+    $this->drupalGet($this->formContentAddUrl);
+    $this->assertResponse(200, 'Article add form can be accessed at ' . $this->formContentAddUrl);
+  }
+
+  /**
+   * Test validation violation of multiple form elements widget.
+   */
+  public function testMultipleFormElementsWidget() {
+    $edit = [];
+    // Add an text area with summary and email field to the article content type.
+    $fieldStorage = FieldStorageConfig::create([
+      'field_name' => 'field_test_multiple',
+      'entity_type' => 'node',
+      'type' => 'text_with_summary_and_email',
+    ]);
+    $fieldStorage->save();
+
+    $fieldInstance = FieldConfig::create([
+      'field_storage' => $fieldStorage,
+      'bundle' => 'article',
+      'label' => 'Text with summary',
+      'settings' => [
+        'display_summary' => TRUE,
+      ],
+    ]);
+    $fieldInstance->save();
+
+    $this->formDisplay
+      ->setComponent($fieldInstance->getName(), [
+        'type' => 'text_textarea_with_summary_and_email',
+      ])->save();
+
+    $email = 'invalid#invalid.com';
+    $edit['title[0][value]'] = $this->randomMachineName(8);
+    $edit['field_test_multiple[0][summary]'] = 'Some summary';
+    $edit['field_test_multiple[0][value]'] = 'Some text';
+    $edit['field_test_multiple[0][email]'] = $email;
+    $this->drupalPostForm($this->formContentAddUrl, $edit, t('Save'));
+    $this->assertResponse(200);
+    $this->assertPattern('/(?ms)<div role="alert">.*1 error has been found.*<div class="item-list">.*<a href="\#edit\-field\-test\-multiple\-0\-email">Email<\/a>.*<\/div>.*<\/div>/', 'Error message for the invalid email "'. $email .'" found on '. $this->formContentAddUrl .' form.');
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_test_multiple[0][email]" and boolean(@aria-invalid)]'), 'Email test field is marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//textarea[@name="field_test_multiple[0][summary]" and not(boolean(@aria-invalid))]'), 'Summary test field is not marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//textarea[@name="field_test_multiple[0][value]" and not(boolean(@aria-invalid))]'), 'Value test field is not marked invalid on form '. $this->formContentAddUrl);
+  }
+
+  /**
+   * Test validation violation of email single cardinality widget.
+   */
+  public function testSingleCardinalityWidget() {
+    $edit = [];
+    // Add an email field to the article content type.
+    $fieldStorage = FieldStorageConfig::create([
+      'field_name' => 'field_email',
+      'entity_type' => 'node',
+      'type' => 'email',
+    ]);
+    $fieldStorage->save();
+
+    $fieldInstance = FieldConfig::create([
+      'field_storage' => $fieldStorage,
+      'bundle' => 'article',
+      'label' => 'Email',
+    ]);
+    $fieldInstance->save();
+
+    $this->formDisplay
+      ->setComponent($fieldInstance->getName(), [
+        'type' => 'email_default',
+        'settings' => [
+          'placeholder' => 'example@example.com',
+        ],
+      ])->save();
+
+    // Post errorneous email address and check form errors.
+    $fieldName = 'field_email[0][value]';
+    $email = 'invalid#invalid.com';
+    $edit['title[0][value]'] = $this->randomMachineName(8);;
+    $edit[$fieldName] = $email;
+    $this->drupalPostForm($this->formContentAddUrl, $edit, t('Save'));
+    $this->assertResponse(200);
+    $this->assertPattern('/(?ms)<div role="alert">.*1 error has been found.*<div class="item-list">.*<a href="\#edit\-field\-email\-0\-value">Email<\/a>.*<\/div>.*<\/div>/', 'Error message for the invalid email "'. $email .'" found on '. $this->formContentAddUrl .' form.');
+    $this->assertTrue((bool) $this->xpath('//input[@name="'. $fieldName .'" and boolean(@aria-invalid)]'), 'Email field is marked invalid on form '. $this->formContentAddUrl);
+  }
+
+  /**
+   * Test validation violation of email multiple cardinality widget.
+   */
+  public function testMultipleCardinalityWidget() {
+    $validEmail1 = 'test1@example.com';
+    $validEmail2 = 'test1@example.com';
+    $invalidEmail1 = 'invalid1#invalid.com';
+    $invalidEmail2 = 'invalid1#invalid.com';
+    $edit = [];
+    // Add an email field to the article content type.
+    $fieldStorage = FieldStorageConfig::create([
+      'field_name' => 'field_email',
+      'entity_type' => 'node',
+      'type' => 'email',
+      'cardinality' => 3,
+    ]);
+    $fieldStorage->save();
+
+    $fieldInstance = FieldConfig::create([
+      'field_storage' => $fieldStorage,
+      'bundle' => 'article',
+      'label' => 'Email',
+    ]);
+    $fieldInstance->save();
+
+    $this->formDisplay
+      ->setComponent($fieldInstance->getName(), [
+        'type' => 'email_default',
+        'settings' => [
+          'placeholder' => 'example@example.com',
+        ],
+      ])->save();
+
+    // Post 3 email addresses, set errorneous email address in second field
+    // and check form errors.
+    $edit['title[0][value]'] = $this->randomMachineName(8);
+    $edit['field_email[0][value]'] = $validEmail1;
+    $edit['field_email[1][value]'] = $invalidEmail1;
+    $edit['field_email[2][value]'] = $validEmail2;
+    $this->drupalPostForm($this->formContentAddUrl, $edit, t('Save'));
+    $this->assertResponse(200);
+    $this->assertPattern('/(?ms)<div role="alert">.*1 error has been found.*<div class="item-list">.*<a href="\#edit\-field\-email\-1\-value">Email \(value 2\)<\/a>.*<\/div>.*<\/div>/', 'Error message for the invalid email "'. $invalidEmail1 .'" found on '. $this->formContentAddUrl .' form.');
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[0][value]" and not(boolean(@aria-invalid))]'), 'First email field is not marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[1][value]" and boolean(@aria-invalid)]'), 'Second email field is marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[2][value]" and not(boolean(@aria-invalid))]'), 'Third email field is not marked invalid on form '. $this->formContentAddUrl);
+
+    // Now set errorneous email address in first and third fields
+    // and check form errors.
+    $edit['title[0][value]'] = $this->randomMachineName(8);
+    $edit['field_email[0][value]'] = $invalidEmail1;
+    $edit['field_email[1][value]'] = $validEmail1;
+    $edit['field_email[2][value]'] = $invalidEmail2;
+    $this->drupalPostForm($this->formContentAddUrl, $edit, t('Save'));
+    $this->assertResponse(200);
+    $this->assertPattern('/(?ms)<div role="alert">.*2 errors have been found.*<div class="item-list">.*<a href="\#edit\-field\-email\-0\-value">Email \(value 1\)<\/a>.*<a href="\#edit\-field\-email\-2\-value">Email \(value 3\)<\/a>.*<\/div>.*<\/div>/', 'Error message for the invalid email "'. $invalidEmail1 .', '. $invalidEmail2 .'" found on '. $this->formContentAddUrl .' form.');
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[0][value]" and boolean(@aria-invalid)]'), 'First email field is marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[1][value]" and not(boolean(@aria-invalid))]'), 'Second email field is not marked invalid on form '. $this->formContentAddUrl);
+    $this->assertTrue((bool) $this->xpath('//input[@name="field_email[2][value]" and boolean(@aria-invalid)]'), 'Third email field is marked invalid on form '. $this->formContentAddUrl);
+  }
+}
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/config/install/widgetbase_error_element_test.settings.yml b/core/modules/system/tests/modules/widgetbase_error_element_test/config/install/widgetbase_error_element_test.settings.yml
new file mode 100644
index 0000000..1ff3cbc
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/config/install/widgetbase_error_element_test.settings.yml
@@ -0,0 +1 @@
+default_summary_length: 600
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/config/schema/widgetbase_error_element_test.schema.yml b/core/modules/system/tests/modules/widgetbase_error_element_test/config/schema/widgetbase_error_element_test.schema.yml
new file mode 100644
index 0000000..fca9110
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/config/schema/widgetbase_error_element_test.schema.yml
@@ -0,0 +1,57 @@
+# Schema for the configuration files of the text module.
+
+widgetbase_error_element_test.settings:
+  type: config_object
+  label: 'Text settings'
+  mapping:
+    default_summary_length:
+      type: integer
+      label: 'Default summary length'
+
+field.storage_settings.text_with_summary_and_email:
+  label: 'Text (formatted, long, with summary and email) settings'
+  type: mapping
+
+field.field_settings.text_with_summary_and_email:
+  type: mapping
+  label: 'Text (formatted, long, with summary and email) settings'
+  mapping:
+    display_summary:
+      type: boolean
+      label: 'Summary input'
+
+field.value.text_with_summary_and_email:
+  type: mapping
+  label: 'Default value'
+  mapping:
+    value:
+      type: text
+      label: 'Body'
+    summary:
+      type: string
+      label: 'Summary'
+    email:
+      type: string
+      label: 'Email'
+    format:
+      type: string
+      label: 'Text format'
+
+field.formatter.settings.text_with_summary_and_email_default:
+  type: mapping
+  label: 'Formatted text default display format settings'
+
+field.widget.settings.text_textarea_with_summary_and_email:
+  type: mapping
+  label: 'Text area with a summary and email display format settings'
+  mapping:
+    rows:
+      type: integer
+      label: 'Rows'
+    summary_rows:
+      type: integer
+      label: 'Number of summary rows'
+    placeholder:
+      type: label
+      label: 'Placeholder'
+
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldFormatter/TextWithSummaryAndEmailDefaultFormatter.php b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldFormatter/TextWithSummaryAndEmailDefaultFormatter.php
new file mode 100644
index 0000000..7aef2d8
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldFormatter/TextWithSummaryAndEmailDefaultFormatter.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\widgetbase_error_element_test\Plugin\Field\FieldFormatter\TextWithSummaryAndEmailDefaultFormatter.
+ */
+
+namespace Drupal\widgetbase_error_element_test\Plugin\Field\FieldFormatter;
+
+use Drupal\Core\Field\FormatterBase;
+use Drupal\Core\Field\FieldItemListInterface;
+
+/**
+ * Plugin implementation of the 'test_text_default' formatter.
+ *
+ * @FieldFormatter(
+ *   id = "text_with_summary_and_email_default",
+ *   label = @Translation("Default"),
+ *   field_types = {
+ *     "text_with_summary_and_email",
+ *   },
+ *   quickedit = {
+ *     "editor" = "plain_text"
+ *   }
+ * )
+ */
+class TextWithSummaryAndEmailDefaultFormatter extends FormatterBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function viewElements(FieldItemListInterface $items) {
+    $elements = array();
+
+    // The ProcessedText element already handles cache context & tag bubbling.
+    // @see \Drupal\filter\Element\ProcessedText::preRenderText()
+    foreach ($items as $delta => $item) {
+      $elements[$delta] = array(
+        '#type' => 'processed_text',
+        '#text' => $item->value,
+        '#format' => $item->format,
+        '#langcode' => $item->getLangcode(),
+      );
+    }
+
+    return $elements;
+  }
+
+}
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldType/TextWithSummaryAndEmailItem.php b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldType/TextWithSummaryAndEmailItem.php
new file mode 100644
index 0000000..beafeec
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldType/TextWithSummaryAndEmailItem.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\widgetbase_error_element_test\Plugin\Field\FieldType\TextWithSummaryAndEmailItem.
+ */
+
+namespace Drupal\widgetbase_error_element_test\Plugin\Field\FieldType;
+
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\TypedData\DataDefinition;
+use Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem;
+
+/**
+ * Plugin implementation of the 'test_text_with_summary' field type.
+ *
+ * @FieldType(
+ *   id = "text_with_summary_and_email",
+ *   label = @Translation("Text (formatted, long, with summary and email)"),
+ *   description = @Translation("This field stores long text with a format and an optional summary and email."),
+ *   category = @Translation("Text"),
+ *   default_widget = "text_textarea_with_summary_and_email",
+ *   default_formatter = "text_with_summary_and_email_default"
+ * )
+ */
+class TextWithSummaryAndEmailItem extends TextWithSummaryItem {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
+    $properties = parent::propertyDefinitions($field_definition);
+
+    $properties['email'] = DataDefinition::create('string')
+      ->setLabel(t('Email'))
+      ->addConstraint('Email', []);
+
+    return $properties;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function schema(FieldStorageDefinitionInterface $field_definition) {
+    $schema = parent::schema($field_definition);
+    $schema['columns']['email'] = ['type' => 'varchar', 'length' => 255];
+    return $schema;
+  }
+
+}
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldWidget/TextareaWithSummaryAndEmailWidget.php b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldWidget/TextareaWithSummaryAndEmailWidget.php
new file mode 100644
index 0000000..1029f5e
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/src/Plugin/Field/FieldWidget/TextareaWithSummaryAndEmailWidget.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\widgetbase_error_element_test\Plugin\Field\FieldWidget\TextareaWithSummaryAndEmailWidget.
+ */
+
+namespace Drupal\widgetbase_error_element_test\Plugin\Field\FieldWidget;
+
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget;
+use Symfony\Component\Validator\ConstraintViolationInterface;
+use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\Component\Utility\NestedArray;
+
+/**
+ * Plugin implementation of the 'text_textarea_with_summary_and_email' widget.
+ *
+ * @FieldWidget(
+ *   id = "text_textarea_with_summary_and_email",
+ *   label = @Translation("Text area with a summary and email"),
+ *   field_types = {
+ *     "text_with_summary_and_email"
+ *   }
+ * )
+ */
+class TextareaWithSummaryAndEmailWidget extends TextareaWithSummaryWidget {
+
+  /**
+   * {@inheritdoc}
+   */
+  function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
+    $element = parent::formElement($items, $delta, $element, $form, $form_state);
+
+    $element['email'] = array(
+      '#type' => 'textfield',
+      '#default_value' => '',
+      '#title' => t('Email'),
+      '#weight' => -50,
+    );
+
+    return $element;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function errorElement(array $element, ConstraintViolationInterface $error, array $form, FormStateInterface $form_state) {
+    $error_path = $this->getLocalErrorPath($error);
+    $nested_element =  NestedArray::getValue($element, $error_path);
+    return is_array($nested_element) ? $nested_element : FALSE;
+  }
+
+}
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.info.yml b/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.info.yml
new file mode 100644
index 0000000..516da0b
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.info.yml
@@ -0,0 +1,5 @@
+name: WidgetBase error element test module
+type: module
+description: 'Helper module for testing WidgetBase error elements.'
+package: Testing
+core: 8.x
diff --git a/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.module b/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.module
new file mode 100644
index 0000000..c6e838d
--- /dev/null
+++ b/core/modules/system/tests/modules/widgetbase_error_element_test/widgetbase_error_element_test.module
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @file
+ * Helper module for testing WidgetBase error elements.
+ *
+ * The module adds validation constraint to summary test field.
+ */
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
index 0ac3151..48a4966 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php
@@ -42,7 +42,8 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    * {@inheritdoc}
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
-    if ($violation->arrayPropertyPath == array('format') && isset($element['format']['#access']) && !$element['format']['#access']) {
+    $error_path = $this->getLocalErrorPath($violation);
+    if ($error_path == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
       // Ignore validation errors for formats if formats may not be changed,
       // i.e. when existing formats become invalid. See filter_process_format().
       return FALSE;
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
index c6bef4f..92339b4 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
@@ -92,7 +92,11 @@ function formElement(FieldItemListInterface $items, $delta, array $element, arra
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
     $element = parent::errorElement($element, $violation, $form, $form_state);
-    return ($element === FALSE) ? FALSE : $element[$violation->arrayPropertyPath[0]];
+    $error_path = $this->getLocalErrorPath($violation);
+    if (isset($error_path[0]) && isset($element[$error_path[0]])) {
+      return $element[$error_path[0]];
+    }
+    return FALSE;
   }
 
 }
diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
index ab2f19a..95f5225 100644
--- a/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
+++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php
@@ -42,7 +42,8 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    * {@inheritdoc}
    */
   public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
-    if ($violation->arrayPropertyPath == array('format') && isset($element['format']['#access']) && !$element['format']['#access']) {
+    $error_path = $this->getLocalErrorPath($violation);
+    if ($error_path == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
       // Ignore validation errors for formats if formats may not be changed,
       // i.e. when existing formats become invalid. See filter_process_format().
       return FALSE;
