core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php index 4801a1e9ac..66355a2a3b 100644 --- a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +++ b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php @@ -59,16 +59,13 @@ public function checkConfigSchema(TypedConfigManagerInterface $typed_config, $co } $errors = array_merge(...$errors); // Also perform explicit validation. Note this does NOT require every node - // in the config schema tree to have validation constraints defined. - // @todo Remove the condition; run it for all config. - if ($config_name === 'media.settings') { - $violations = $this->schema->validate(); - $validation_errors = array_map( - fn (ConstraintViolation $v) => sprintf("[%s] %s", $v->getPropertyPath(), (string) $v->getMessage()), - iterator_to_array($violations) - ); - $errors = array_merge($errors, $validation_errors); - } + // in the config schema tree to have validation constraints defined. + $violations = $this->schema->validate(); + $validation_errors = array_map( + fn (ConstraintViolation $v) => sprintf("[%s] %s", $v->getPropertyPath(), (string) $v->getMessage()), + iterator_to_array($violations) + ); + $errors = array_merge($errors, $validation_errors); if (empty($errors)) { return TRUE; }