NotNullConstraint.php

Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
  2. 10 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
  3. 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php

View source
<?php

namespace Drupal\Core\Validation\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraints\NotNull;

/**
 * NotNull constraint.
 *
 * Overrides the symfony constraint to handle empty Typed Data structures.
 *
 * @Constraint(
 *   id = "NotNull",
 *   label = @Translation("NotNull", context = "Validation"),
 *   type = false
 * )
 */
class NotNullConstraint extends NotNull {

}

Classes

Title Deprecated Summary
NotNullConstraint NotNull constraint.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.