Tag Archives | email validation

PHP5 Email Validation

In prior version of PHP you had to use some regex solution to validate an email address, now in PHP5 it’s as simple as: function isValidEmail($email){ return filter_var(filter_var($email, FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL); } if(isValidEmail(’[email protected]’)){ //valid } else { //not valid } I’ve been using PHP5 ever since it was released but didn’t look into the PECL Filter […]

Continue Reading 16