user_validate_mail

Versions
4.6 – 7
user_validate_mail($mail)

▾ 3 functions call user_validate_mail()

install_configure_form_validate in ./install.php
Form API validate for the site configuration form.
system_site_information_settings_validate in modules/system/system.admin.inc
Validate the submitted site-information form.
_user_edit_validate in modules/user/user.module

Code

modules/user/user.module, line 401

<?php
function user_validate_mail($mail) {
  if (!$mail) return t('You must enter an e-mail address.');
  if (!valid_email_address($mail)) {
    return t('The e-mail address %mail is not valid.', array('%mail' => $mail));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.