EmailAddress validator and hostname

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

EmailAddress validator and hostname

Marc Tempelmeier
Hi,

I want to validate email addresses and took a read through the internet about email length.
I stumpled upon this article which told me the max length is 254:

http://isemail.info/about

Then I started to write some tests for my inputfilter, but I canĀ“t get the number higher than 64 for the local and 63 for the hostname part.

What am I doing wrong or how do these number compare to each other?

Greetings and thx in advance

Marc

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: EmailAddress validator and hostname

Thomas D.
Hi,

you have to differentiate between "local part" and "domain":

https://tools.ietf.org/html/rfc2821#section-4.5.3.1
https://tools.ietf.org/html/rfc5321#section-4.5.3.1 (newer)

The hostname limitation comes from

https://tools.ietf.org/html/rfc1035#section-2.3.4


If you are wondering about 63 vs 64 or 255 vs 254 read
http://blogs.msdn.com/b/oldnewthing/archive/2012/04/12/10292868.aspx


-Thomas



--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Regards,
Thomas