FieldWidgetConstraintValidator.php
Same filename in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraintValidator.php
- 10 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraintValidator.php
- 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraintValidator.php
Namespace
Drupal\entity_test\Plugin\Validation\ConstraintFile
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ FieldWidgetConstraintValidator.php
View source
<?php
namespace Drupal\entity_test\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
/**
* Validates the FieldWidgetConstraint constraint.
*/
class FieldWidgetConstraintValidator extends ConstraintValidator {
/**
* {@inheritdoc}
*/
public function validate($field_item, Constraint $constraint) {
$this->context
->addViolation($constraint->message);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
FieldWidgetConstraintValidator | Validates the FieldWidgetConstraint constraint. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.