You are here

UserNameUnique.php in Zircon Profile 8

File

core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
View source
<?php

/**
 * @file
 * Contains \Drupal\user\Plugin\Validation\Constraint\UserNameUnique.
 */
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

Namesort descending Description
UserNameUnique Checks if a user name is unique on the site.