class FieldWidgetConstraintValidator in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraintValidator.php \Drupal\entity_test\Plugin\Validation\Constraint\FieldWidgetConstraintValidator
- 9 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraintValidator.php \Drupal\entity_test\Plugin\Validation\Constraint\FieldWidgetConstraintValidator
Validates the FieldWidgetConstraint constraint.
Hierarchy
- class \Drupal\entity_test\Plugin\Validation\Constraint\FieldWidgetConstraintValidator extends \Symfony\Component\Validator\ConstraintValidator
Expanded class hierarchy of FieldWidgetConstraintValidator
File
- core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ FieldWidgetConstraintValidator.php, line 11
Namespace
Drupal\entity_test\Plugin\Validation\ConstraintView source
class FieldWidgetConstraintValidator extends ConstraintValidator {
/**
* {@inheritdoc}
*/
public function validate($field_item, Constraint $constraint) {
$this->context
->addViolation($constraint->message);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldWidgetConstraintValidator:: |
public | function |