Username length

@neo will know this without looking it up :slight_smile:

Rob, whats the longest username on the forum? Am I safe to validate usernames as <32 chars?
Or should I go to 48?

Are you looking for how to break the site? :wink:


Privacy. Security. Freedom

Nope looking to build validation rules for a form that will take the username :slight_smile:



        if len(username) > 20:
            return 'Invalid username. Must be no more than 20 characters.', 400

And for sure someone will request that they can have 24 chars in their username and you know Murphy we will forget that you need it 20 or less.

Iโ€™d for good programming practice allow up to 40 chars or more like your 48. Thatโ€™ll cover 32 or 35 name length request. It is extremely rare for anyone to want more than 30 let alone 32 or 35 and 40 will make absolutely sure

1 Like