function valid_email_address
7.x common.inc | valid_email_address($mail) |
6.x common.inc | valid_email_address($mail) |
Verifies the syntax of the given e-mail address.
This uses the PHP e-mail validation filter.
Parameters
$mail: A string containing an e-mail address.
Return value
TRUE if the address is in a valid format.
Related topics
8 calls to valid_email_address()
- comment_form_validate in drupal-7.x/
modules/ comment/ comment.module - Validate comment form submissions.
- contact_category_edit_form_validate in drupal-7.x/
modules/ contact/ contact.admin.inc - Form validation handler for contact_category_edit_form().
- contact_personal_form_validate in drupal-7.x/
modules/ contact/ contact.pages.inc - Form validation handler for contact_personal_form().
- contact_site_form_validate in drupal-7.x/
modules/ contact/ contact.pages.inc - Form validation handler for contact_site_form().
- system_send_email_action_validate in drupal-7.x/
modules/ system/ system.module - Validate system_send_email_action form submissions.
File
- drupal-7.x/
includes/ common.inc, line 1186 - Common functions that many Drupal modules will need to reference.
Code
function valid_email_address($mail) {
return (bool) filter_var($mail, FILTER_VALIDATE_EMAIL);
}