diff --git a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
index 10421abaae..0cc5b3815e 100644
--- a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
+++ b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
@@ -281,7 +281,7 @@ protected static function matchEntityByTitle(SelectionInterface $handler, $input
     if (empty($entities)) {
       if ($strict) {
         // Error if there are no entities available for a required field.
-        $form_state->setError($element, t('There are no entities matching "%value".', $params));
+        $form_state->setError($element, t('Invalid value "%value" chosen for "%field_name".', $params + ['%field_name' => $element['#title']]));
       }
     }
     elseif (count($entities) > 5) {
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
index b2ac0229a8..80a4032d19 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php
@@ -172,7 +172,7 @@ public function testFieldAdminHandler() {
     $this->drupalPostForm('node/add/' . $this->type, $edit, t('Save'));
 
     // Assert that entity reference autocomplete field is validated.
-    $this->assertText(t('There are no entities matching "@entity"', ['@entity' => 'Test']));
+    $this->assertText(t('Invalid value "@value" chosen for "@field_name".', ['@value' => 'Test', '@field_name' => 'Test Entity Reference Field (value 1)']));
 
     $edit = [
       'title[0][value]' => 'Test',
