You are here

class NotNullConstraint in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint
  2. 9 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint

NotNull constraint.

Overrides the symfony constraint to handle empty Typed Data structures.

Plugin annotation


@Constraint(
  id = "NotNull",
  label = @Translation("NotNull", context = "Validation"),
  type = false
)

Hierarchy

  • class \Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint extends \Symfony\Component\Validator\Constraints\NotNull

Expanded class hierarchy of NotNullConstraint

1 file declares its use of NotNullConstraint
ModerationStateConstraintValidator.php in core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php, line 18

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint
View source
class NotNullConstraint extends NotNull {

}

Members