public function EmailValidator::isValid in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Utility/EmailValidator.php \Drupal\Component\Utility\EmailValidator::isValid()
- 10 core/lib/Drupal/Component/Utility/EmailValidator.php \Drupal\Component\Utility\EmailValidator::isValid()
Validates an email address.
Parameters
string $email: A string containing an email address.
\Egulias\EmailValidator\Validation\EmailValidation|null $email_validation: This argument is ignored. If it is supplied an error will be triggered. See https://www.drupal.org/node/2997196.
Return value
bool TRUE if the address is valid.
Overrides EmailValidatorInterface::isValid
File
- core/
lib/ Drupal/ Component/ Utility/ EmailValidator.php, line 26
Class
- EmailValidator
- Validates email addresses.
Namespace
Drupal\Component\UtilityCode
public function isValid($email, EmailValidation $email_validation = NULL) {
if ($email_validation) {
throw new \BadMethodCallException('Calling \\Drupal\\Component\\Utility\\EmailValidator::isValid() with the second argument is not supported. See https://www.drupal.org/node/2997196');
}
return parent::isValid($email, new RFCValidation());
}