Skip to the content.

There are no “special characters” which should cause trouble when encountered in a name, yet people regularly encounter cases of systems rejecting their names as “invalid”. Obviously, if a government has recognised someone’s name as their official name, then their name is valid. So don’t try to be clever and implement any kind of validation or cleanup beyond basic trimming of leading and trailing whitespace and Unicode normalisation.

John Graham-Cumming blogged about the hyphen in his name being rejected by Yahoo in 2010, but you see this complaint on Twitter frequently today.

People with apostrophes in their names are picked on particularly often, quite possibly because a developer heard about SQL injection attacks, and instead of fixing them properly, decided to ban apostrophes in all fields.

Spaces can occur in names. Colons can occur in names. Most likely anything can occur in names, so it’s best not to restrict it at all.

You can’t even assume that a person won’t have multiple name parts with the same value.

And of course, you definitely can’t assume that someone’s name won’t contain something that you or your dictionary consider a “bad” word.

Several people with the surname Cummings on Twitter have been seen complaining about systems rejecting their names.

In general, this problem is referred to as the Scunthorpe problem.