UserMailUnique.php

Same filename in other branches
  1. 9 core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
  2. 10 core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
  3. 11.x core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php

Namespace

Drupal\user\Plugin\Validation\Constraint

File

core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php

View source
<?php

namespace Drupal\user\Plugin\Validation\Constraint;

use Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint;

/**
 * Checks if a user's email address is unique on the site.
 *
 * @Constraint(
 *   id = "UserMailUnique",
 *   label = @Translation("User email unique", context = "Validation")
 * )
 */
class UserMailUnique extends UniqueFieldConstraint {
    public $message = 'The email address %value is already taken.';

}

Classes

Title Deprecated Summary
UserMailUnique Checks if a user's email address is unique on the site.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.