class EntityFieldUniqueValuesValidator in Helper 8
Validates duplicate entity field values.
Hierarchy
- class \Drupal\helper\Plugin\Validation\Constraint\FieldListUniqueValuesValidator extends \Symfony\Component\Validator\ConstraintValidator
- class \Drupal\helper\Plugin\Validation\Constraint\EntityFieldUniqueValuesValidator
Expanded class hierarchy of EntityFieldUniqueValuesValidator
File
- src/
Plugin/ Validation/ Constraint/ EntityFieldUniqueValuesValidator.php, line 10
Namespace
Drupal\helper\Plugin\Validation\ConstraintView source
class EntityFieldUniqueValuesValidator extends FieldListUniqueValuesValidator {
/**
* {@inheritdoc}
*/
public function validate($value, Constraint $constraint) {
/** @var \Drupal\Core\Entity\FieldableEntityInterface $value */
parent::validate($value
->get($constraint->field_name), $constraint);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityFieldUniqueValuesValidator:: |
public | function |
Checks if the passed value is valid. Overrides FieldListUniqueValuesValidator:: |