You are here

class UserNameUnique in Drupal 9

Same name and namespace in other branches
  1. 8 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

Expanded class hierarchy of UserNameUnique

File

core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php, line 15

Namespace

Drupal\user\Plugin\Validation\Constraint
View source
class UserNameUnique extends UniqueFieldConstraint {
  public $message = 'The username %value is already taken.';

}

Members