You are here

class RestTestConstraint in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint
  2. 9 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