Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should be the valid characters in usernames? [closed]

Many web based user authentication systems don't allow usernames that contain characters other than letters, numbers and underscores.

Could there be a technical reason for that?

like image 257
Emanuil Rusev Avatar asked Jan 12 '10 23:01

Emanuil Rusev


People also ask

What is valid username example?

This name is commonly an abbreviation of the user's full name or his or her alias. For example, an individual known as John Smith may be assigned the username smitj, the first four letters of the last name followed by the first letter of the first name.

What characters are illegal usernames?

Many web based user authentication systems don't allow usernames that contain characters other than letters, numbers and underscores.

What is valid username and password?

Under normal circumstances, a valid user ID and password can contain the following characters: Lowercase characters {a-z} Uppercase characters {A-Z} Numbers {0-9}


1 Answers

A well-designed system doesn't necessarily need to prevent any special characters in usernames.

That said, the reason underscores have traditionally been accepted, is that underscore is typically treated as a "word" character, along with letters and numbers. It is usually the only other character given this distinction. This is true in regular expressions, and even at a base level in most operating systems (type an underscore in a word and double click the letters. The selection will extend past the underscore. Now try the same with a dash, it most likely will not.)

like image 111
Nicole Avatar answered Sep 19 '22 16:09

Nicole