diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php index ae13c9d..5dbe64c 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php @@ -35,7 +35,8 @@ public function validate($value, Constraint $constraint) { throw new \LogicException('Cannot validate allowed values for complex data without a main property.'); } $value = $typed_data->get($name)->getValue(); - // If main property's value is NULL, we make the validation pass. + // If main property's value is empty, e.g., FALSE, NULL, 0, we make + // the validation pass. if (empty($value)) { return TRUE; }