> I put a small one together using regular expressions,
> http://www.ashleysheridan.co.uk/coding_php_validation.php
So we are "regexing" emails again?
#OUT OF coding_php_validation.php COPY
case 'email':
{
$expression = "/^([a-z0-9_\-\.]+)@([a-z0-9_\-\.]+)\.([a-z]{2,5})$/i";
$errorText = "The email does not appear to be a valid type.";
break;
}
#END COPY
What should be valid email addresses according to RFC 2822 [1]:
!#$%&*+-/=?^_`{|[EMAIL PROTECTED]
"@"@example.com
Not valid email addresses:
"\"@example.com
@@example.com
- [EMAIL PROTECTED]
Valid email addresses according to the Multipurpose Internet Mail
Extension (MIME) [2]:
[EMAIL PROTECTED]
Ã(c)@℞.com