diff -Naur drupal.orig/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php drupal/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php --- drupal.orig/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php 2020-08-11 20:12:32.007018221 +0200 +++ drupal/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php 2020-08-11 20:55:58.564671254 +0200 @@ -72,7 +72,8 @@ if (!$valid) { // @todo: Provide a good violation message for each problem. - $this->context->addViolation($constraint->message, [ + $msg = $constraint->message . " " . get_class($typed_data) . ": " . $typed_data->getName(); + $this->context->addViolation($msg, [ '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value), ]); } diff -Naur drupal.orig/web/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php drupal/web/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php --- drupal.orig/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php 2020-08-11 20:53:17.445660880 +0200 +++ drupal/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php 2020-08-11 20:12:09.166593916 +0200 @@ -131,7 +131,7 @@ $request_options[RequestOptions::BODY] = $this->serializer->encode($normalization, static::$format); $response = $this->request($method, $url, $request_options); - $message = "Unprocessable Entity: validation failed.\n{$fieldName}.0: The datetime value must be a string.\n{$fieldName}.0.value: This value should be of the correct primitive type.\n"; + $message = "Unprocessable Entity: validation failed.\n{$fieldName}.0: The datetime value must be a string.\n{$fieldName}.0.value: This value should be of the correct primitive type. Drupal\\Core\\TypedData\\Plugin\\DataType\\DateTimeIso8601: value\n"; $this->assertResourceErrorResponse(422, $message, $response); // DX: 422 when date format is incorrect.