How to do Email Validation

Using the PHP filter_var function we can test email addresses for valid format and only unicode characters. Example usage below.

function isValidEmailSimple($emailAddress) {
	if (filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) return true;
	return false;
}

Leave a Reply

Your email address will not be published. Required fields are marked *