Created
April 13, 2018 12:48
-
-
Save noam-sc/ee2897c45949d1f2745b2bd3f88bb132 to your computer and use it in GitHub Desktop.
Validate an email with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!filter_var($mail_to_check, FILTER_VALIDATE_EMAIL)) { | |
// Invalid mail | |
} else { | |
// Valid mail | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment