function UserNameConstraint::__construct
Same name and namespace in other branches
- 11.x core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php \Drupal\user\Plugin\Validation\Constraint\UserNameConstraint::__construct()
Attributes
#[HasNamedArguments]
File
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserNameConstraint.php, line 19
Class
- UserNameConstraint
- Checks if a value is a valid user name.
Namespace
Drupal\user\Plugin\Validation\ConstraintCode
public function __construct(mixed $options = NULL, public $emptyMessage = 'You must enter a username.', public $spaceBeginMessage = 'The username cannot begin with a space.', public $spaceEndMessage = 'The username cannot end with a space.', public $multipleSpacesMessage = 'The username cannot contain multiple spaces in a row.', public $invalidMessage = 'The username contains an invalid character.', public $tooLongMessage = 'The username %name is too long: it must be %max characters or less.', ?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.