A new Drupal\Core\Validation\BasicRecursiveValidatorFactory and 'validation.basic_recursive_validator_factory' service has been added.
This factory can be used to create a \Symfony\Component\Validator\Validator\RecursiveValidator instance using our current ExecutionContextFactory with \Drupal\Core\Validation\DrupalTranslator and our ClassResolver. This allows constraint validation errors to be returned as TranslatableMarkup for use in output.
The Drupal\Core\TypedData\Validation\RecursiveValidator requires Typed Data, while this can be used to create a recursive validator for plain PHP objects.
Constraint violation message templates should use Drupal's placeholder syntax. See the documentation of
\Drupal\Component\Render\FormattableMarkup::placeholderFormat() for details.