interface EmailValidatorInterface

Same name in other branches
  1. 8.9.x core/lib/Drupal/Component/Utility/EmailValidatorInterface.php \Drupal\Component\Utility\EmailValidatorInterface
  2. 10 core/lib/Drupal/Component/Utility/EmailValidatorInterface.php \Drupal\Component\Utility\EmailValidatorInterface
  3. 11.x core/lib/Drupal/Component/Utility/EmailValidatorInterface.php \Drupal\Component\Utility\EmailValidatorInterface

Validates email addresses.

Hierarchy

Expanded class hierarchy of EmailValidatorInterface

All classes that implement EmailValidatorInterface

4 files declare their use of EmailValidatorInterface
ContactFormEditForm.php in core/modules/contact/src/ContactFormEditForm.php
EmailAction.php in core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php
UpdateSettingsForm.php in core/modules/update/src/UpdateSettingsForm.php
UserPasswordForm.php in core/modules/user/src/Form/UserPasswordForm.php

File

core/lib/Drupal/Component/Utility/EmailValidatorInterface.php, line 8

Namespace

Drupal\Component\Utility
View source
interface EmailValidatorInterface {
    
    /**
     * Validates an email address.
     *
     * @param string $email
     *   A string containing an email address.
     *
     * @return bool
     *   TRUE if the address is valid.
     */
    public function isValid($email);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
EmailValidatorInterface::isValid public function Validates an email address. 1

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