Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 895 Bytes

File metadata and controls

27 lines (18 loc) · 895 Bytes

email_IsValid

PHP function to validate if an email address is valid or not.

This function includes checking for email injections, syntax formatting, dns checking, and a few basic TLD corrections.

Usage

Here is how you use the email_IsValid() function:

$Email = 'foo@.com';
//
if ( !email_IsValid($Email) ) {
    //
    die('The email address you entered does not appear to be a valid email address.');
    //
}

Requirements

This function requires that you have access to the idn_to_ascii() function, which requires your PHP server have intl installed, if you want the dns check to perform.

License

The MIT License (MIT). Please see License File for more information.