class RestTestConstraint

Same name in other branches
  1. 8.9.x core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint
  2. 10 core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint
  3. 11.x core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint

Adds some validations for a REST test field.

Plugin annotation


@Constraint(
  id = "rest_test_validation",
  label = @Translation("REST test validation", context = "Validation")
)

Hierarchy

  • class \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of RestTestConstraint

See also

\Drupal\Core\TypedData\OptionsProviderInterface

File

core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php, line 17

Namespace

Drupal\rest_test\Plugin\Validation\Constraint
View source
class RestTestConstraint extends Constraint {
    public $message = 'REST test validation failed';

}

Members

Title Sort descending Modifiers Object type Summary
RestTestConstraint::$message public property

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