function valid_email_address
Same name in other branches
- 7.x includes/common.inc \valid_email_address()
Verifies the syntax of the given email address.
Parameters
string $mail: A string containing an email address.
Return value
bool TRUE if the address is in a valid format.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::service('email.validator')->isValid().
See also
https://www.drupal.org/node/2912661
Related topics
File
-
core/
includes/ common.inc, line 182
Code
function valid_email_address($mail) {
return \Drupal::service('email.validator')->isValid($mail);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.