Yet another PHP email validator
function IsValidEmail ($address) {
return (preg_match(
'/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+'. // the user name
'@'. // at-sign
'([-0-9A-Z]+\.)+' . // host, sub, and domain names
'([0-9A-Z]){2,4}$/i', // top-level domain
trim($address)));
}
Leave a comment