validate_email

Deprecated functionality to validate an email address.

Description

(string|bool) validate_email( (string) $email, (constant) $check_domain = true ); 

Returns (string|bool)

Either false or the valid email address.

Parameters (2)

0. $email (string)
Email address to verify.
1. $check_domain — Optional. (constant) => true
The check domain.

Usage

  1. if ( !function_exists( 'validate_email' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-deprecated.php'; 
  3.  
  4. // Email address to verify. 
  5. $email = ''; 
  6.  
  7. // The check domain. 
  8. $check_domain = true; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = validate_email($email, $check_domain); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-deprecated.php  
  1. function validate_email( $email, $check_domain = true) { 
  2. _deprecated_function( __FUNCTION__, '3.0.0', 'is_email()' ); 
  3. return is_email( $email, $check_domain );