You are here

class TestValidatedReferenceConstraint in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\TestValidatedReferenceConstraint
  2. 10 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\TestValidatedReferenceConstraint

Validates referenced entities.

Plugin annotation


@Constraint(
  id = "TestValidatedReferenceConstraint",
  label = @Translation("Test validated reference constraint.")
)

Hierarchy

Expanded class hierarchy of TestValidatedReferenceConstraint

1 string reference to 'TestValidatedReferenceConstraint'
RecursiveContextualValidatorTest::testRecursiveViolationPropagation in core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php
Tests recursive propagation of violations.

File

core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/TestValidatedReferenceConstraint.php, line 15

Namespace

Drupal\entity_test\Plugin\Validation\Constraint
View source
class TestValidatedReferenceConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'Invalid referenced entity.';

}

Members

Namesort descending Modifiers Type Description Overrides
TestValidatedReferenceConstraint::$message public property The default violation message.