Warning: This function has been deprecated. Use is_email() instead.

validate_email() WordPress Function

The validate_email() function is used to check whether an email address is valid. It returns true if the email address is valid, and false if it is not. This function is useful for making sure that a user's email address is valid before allowing them to register for a website or sign up for a newsletter.

validate_email( string $email, bool $check_domain = true ) #

Deprecated functionality to validate an email address.


Description

Top ↑

See also


Top ↑

Parameters

$email

(string)(Required)Email address to verify.

$check_domain

(bool)(Optional)Deprecated.

Default value: true


Top ↑

Return

(string|false) Valid email address on success, false on failure.


Top ↑

Source

File: wp-includes/ms-deprecated.php

function validate_email( $email, $check_domain = true) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'is_email()' );
	return is_email( $email, $check_domain );
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Use is_email()
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.