class UserNameUnique
Same name in other branches
- 8.9.x core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php \Drupal\user\Plugin\Validation\Constraint\UserNameUnique
- 10 core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php \Drupal\user\Plugin\Validation\Constraint\UserNameUnique
- 11.x core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php \Drupal\user\Plugin\Validation\Constraint\UserNameUnique
Checks if a user name is unique on the site.
Plugin annotation
@Constraint(
id = "UserNameUnique",
label = @Translation("User name unique", context = "Validation"),
)
Hierarchy
- class \Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint extends \Symfony\Component\Validator\Constraint
- class \Drupal\user\Plugin\Validation\Constraint\UserNameUnique extends \Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint
Expanded class hierarchy of UserNameUnique
File
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserNameUnique.php, line 15
Namespace
Drupal\user\Plugin\Validation\ConstraintView source
class UserNameUnique extends UniqueFieldConstraint {
public $message = 'The username %value is already taken.';
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
UniqueFieldConstraint::validatedBy | public | function | ||
UserNameUnique::$message | public | property | Overrides UniqueFieldConstraint::$message |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.