class EmailConstraint
Same name in other branches
- 9 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint
- 8.9.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint
- 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint
Count constraint.
Overrides the symfony constraint to use the strict setting.
Hierarchy
- class \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint extends \Symfony\Component\Validator\Constraints\Email
Expanded class hierarchy of EmailConstraint
1 file declares its use of EmailConstraint
- ConstraintManager.php in core/
lib/ Drupal/ Core/ Validation/ ConstraintManager.php
File
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ EmailConstraint.php, line 14
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintView source
class EmailConstraint extends Email {
/**
* {@inheritdoc}
*/
public function __construct(...$args) {
$this->mode = static::VALIDATION_MODE_STRICT;
parent::__construct(...$args);
}
/**
* {@inheritdoc}
*
* @return string
* The name of the class that validates this constraint.
*
* @todo Add method return type declaration.
* @see https://www.drupal.org/project/drupal/issues/3425150
*/
public function validatedBy() {
return EmailValidator::class;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
EmailConstraint::validatedBy | public | function | @todo Add method return type declaration. |
EmailConstraint::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.