You are here

class EntityFieldUniqueValuesValidator in Helper 8

Validates duplicate entity field values.

Hierarchy

Expanded class hierarchy of EntityFieldUniqueValuesValidator

File

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

Namespace

Drupal\helper\Plugin\Validation\Constraint
View 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