UserNameUnique.php
Same filename in other branches
Namespace
Drupal\user\Plugin\Validation\ConstraintFile
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserNameUnique.php
View source
<?php
namespace Drupal\user\Plugin\Validation\Constraint;
use Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint;
/**
* Checks if a user name is unique on the site.
*
* @Constraint(
* id = "UserNameUnique",
* label = @Translation("User name unique", context = "Validation"),
* )
*/
class UserNameUnique extends UniqueFieldConstraint {
public $message = 'The username %value is already taken.';
}
Classes
Title | Deprecated | Summary |
---|---|---|
UserNameUnique | Checks if a user name is unique on the site. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.