class UserNameUnique in Drupal 8
Same name and namespace in other branches
- 9 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
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UniqueFieldConstraint:: |
public | function | Returns the name of the class that validates this constraint. | |
UserNameUnique:: |
public | property |
Overrides UniqueFieldConstraint:: |