You are here

public function EntityFieldUniqueValuesValidator::validate in Helper 8

Overrides FieldListUniqueValuesValidator::validate

File

src/Plugin/Validation/Constraint/EntityFieldUniqueValuesValidator.php, line 15

Class

EntityFieldUniqueValuesValidator
Validates duplicate entity field values.

Namespace

Drupal\helper\Plugin\Validation\Constraint

Code

public function validate($value, Constraint $constraint) {

  /** @var \Drupal\Core\Entity\FieldableEntityInterface $value */
  parent::validate($value
    ->get($constraint->field_name), $constraint);
}