/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function validEmail($email) { $isValid = true; $isValid = false; } else { if ($localLen < 1 || $localLen > 64) { $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { $isValid = false; $isValid = false; $isValid = false; $isValid = false; } else if (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',str_replace("\\\\","",$local))) { $isValid = false; } } $isValid = false; } } return $isValid; }