DEV Community

What's in a name (validation)?

Carly Ho 🌈 on October 08, 2018

This article was adapted from my talk at AlterConf Chicago 2017, which has also been adapted into a handy zine version! Validating Names ...
Collapse
 
david_j_eddy profile image
David J Eddy

Yet another example where the perfect work of math (computers) collides in a very frustrating way with the real world.

Maybe Computerphile could do a video about human names the same way they did for timezones.

Collapse
 
arxeiss profile image
Pavel Kutáč

Thanks for nice article. It is fully true. And now I have to review my forms again.

Just want to share something I bothered with names.
I made a system - and yes, there is First name and Last name field. Because parents are putting there their kids names. And we want to have a list, where Given name is first. For easier usage later.

But some parents are putting there names with CAPS LOCK ON. Not sure why, maybe because it will yell to others, so instructors will notice their kids in the list sooner? So list looks like this then: Peter, Hannah, JOHN, Sylvia.

So I used some libraries to manipulate the name and convert to "correct" caps. I believe, there might be names which will be converted wrong. But it works in 99% cases. I don't like that, but I have to do that. If Caps Lock would be used once in thousands, I wouldn't care so much. But in 20 applications, I see it 3 times. And it is horrible.

Collapse
 
junibugs profile image
Junibugs

Thanks for the great article. Would you have any suggestions for single-letter family names? I work in Product and looking to solve this issue in our portal.

I've been researching the topic and found an example of a solution adopted by Brittish Airways: BA does not allow special characters nor single-letter names in the surname field of their booking portal, so they prompt the booker to input their last name twice. Therefore, the user will input "UU" instead of "U".

I'm not convinced that this provides the best user experience so would love to hear your thoughts.

Thanks in advance.

Collapse
 
jess profile image
Jess Lee

Awesome points, Carly. I think it'll be a long ways before we can move away from the first/last name standard, but what are your thoughts on preferred/nickname fields?

Collapse
 
carlymho profile image
Carly Ho 🌈

I think preferred name/nickname/display name fields are a great idea! It's a great way to let people choose how they'd like to be addressed. I personally have a lot of friends who go by nicknames or middle names and so on, so I think also specifying that you can pick something other than your first name to be addressed by is a nice touch, also.

Collapse
 
dmfay profile image
Dian Fay

Gojko Adzic had a good talk about this too: