class UserMailUnique
Checks if a user's email address is unique on the site.
Attributes
#[Constraint(id: 'UserMailUnique', label: new TranslatableMarkup('User email unique', [], [
'context' => 'Validation',
]))]
Hierarchy
- class \Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint extends \Symfony\Component\Validator\Constraint
- class \Drupal\user\Plugin\Validation\Constraint\UserMailUnique extends \Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldConstraint
Expanded class hierarchy of UserMailUnique
File
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserMailUnique.php, line 12
Namespace
Drupal\user\Plugin\Validation\ConstraintView source
class UserMailUnique extends UniqueFieldConstraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'The email address %value is already taken.';
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
|---|---|---|---|---|---|
| UniqueFieldConstraint::$caseSensitive | public | property | This constraint is case-insensitive by default. | 1 | |
| UniqueFieldConstraint::validatedBy | public | function | 1 | ||
| UserMailUnique::$message | public | property | The default violation message. | Overrides UniqueFieldConstraint::$message |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.