You are here

public function CommentNameConstraint::coversFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 47
Contains \Drupal\comment\Plugin\Validation\Constraint\CommentNameConstraint.

Class

CommentNameConstraint
Supports validating comment author names.

Namespace

Drupal\comment\Plugin\Validation\Constraint

Code

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