You are here

public function CommentNameConstraint::coversFields in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php \Drupal\comment\Plugin\Validation\Constraint\CommentNameConstraint::coversFields()

An array of entity fields which should be passed to the validator.

Return value

string[] An array of field names.

Overrides CompositeConstraintBase::coversFields

File

core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php, line 42

Class

CommentNameConstraint
Supports validating comment author names.

Namespace

Drupal\comment\Plugin\Validation\Constraint

Code

public function coversFields() {
  return [
    'name',
    'uid',
  ];
}