I am using this expression to validate e-mail addresses:
"^[_a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$"
I noticed that in order for the e-mail address to validate, I need to put in at least 3 characters before the @ symbol. Is this a requirement? What if I just want to have an e-mail address with 1 or 2 characters before the @ symbol?
It is entirely possible to have an e-mail address with just one character. All of the guidelines are defined in RFC822: http://www.ietf.org/rfc/rfc0822.txt?number=822
The necessary REGEX: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With