private function AllowedValuesConstraintValidator::validateUsingCoreValidation in Select (or other) 8
Same name and namespace in other branches
- 4.x src/Plugin/Validation/AllowedValuesConstraintValidator.php \Drupal\select_or_other\Plugin\Validation\AllowedValuesConstraintValidator::validateUsingCoreValidation()
1 call to AllowedValuesConstraintValidator::validateUsingCoreValidation()
- AllowedValuesConstraintValidator::validate in src/
Plugin/ Validation/ AllowedValuesConstraintValidator.php - Checks if the passed value is valid.
File
- src/
Plugin/ Validation/ AllowedValuesConstraintValidator.php, line 83
Class
- AllowedValuesConstraintValidator
- Validates the AllowedValues constraint.
Namespace
Drupal\select_or_other\Plugin\ValidationCode
private function validateUsingCoreValidation($value, Constraint $constraint) {
$core_validator = new \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraintValidator($this->currentUser);
$core_validator->context = $this->context;
$core_validator
->validate($value, $constraint);
}