function CommentNameConstraint::__construct

Attributes

#[HasNamedArguments]

File

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

Class

CommentNameConstraint
Supports validating comment author names.

Namespace

Drupal\comment\Plugin\Validation\Constraint

Code

public function __construct(mixed $options = NULL, public $messageNameTaken = 'The name you used (%name) belongs to a registered user.', public $messageRequired = 'You have to specify a valid author.', public $messageMatch = 'The specified author name does not match the comment author.', ?array $groups = NULL, mixed $payload = NULL) {
  parent::__construct($options, $groups, $payload);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.