I want to validate an e-mail field both on the page and in the database, but I do not know what character limit an e-mail can have. Hugs!
I want to validate an e-mail field both on the page and in the database, but I do not know what character limit an e-mail can have. Hugs!
RFC 5321 specifies (section 4.5.3): maximum 256 characters for a full email.
Other limits: 255 for the domain, 64 for the username (part that comes before the @).
However, it is recommended that servers accept addresses outside of these limits (4.5.3.1). These are before thresholds that the server must implement, not maximum limits to filter out. (But an email longer than 256 characters should be anomalous.)