What are the standard minimum and maximum lengths of username, password and email?
Username is a string with a maximum length of 256 characters.
The maximum length of a password that a human user could actually type to log into Windows in 127 characters (the limitation is in the Windows GUI). 127 is probably quite impractical for a user to type, but might be good for admin accounts where passwords are checked out and copied and pasted from a password vault.
In addition to restrictions on syntax, there is a length limit on email addresses. That limit is a maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters.
In most environments, an eight-character password is recommended because it's long enough to provide adequate security and still short enough for users to easily remember. A minimum password length greater than 14 isn't supported at this time. This value will help provide adequate defense against a brute force attack.
A little late to the party, but here is my answer: Maximum User Field Lengths Query for StackOverflow
And the query results below for posterity:
Max DisplayName Max Password Max Email Length
Length Used On SO Length
------------------ ------------ ----------------------------------------------------
36 As long as 254 (See: https://stackoverflow.com/a/574698/1945631)
possible
(1 row(s) affected)
And, from the above query results, the maximum email length answer as a link
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