Validations of the Name Field

I was talking with some friends, the other day about how I got 3 letters on my mailbox. All of them were the exactly same letter, but one was sent to
Yeomans G. Rivera, the second one was sent to Gustavo R. Yeomans, and the third one was sent to Gustavo RiveraYeomans.

None of which was my correct name. In my country, México, names are different from what is the tradition in the US, we have a First Name. Maybe 0, 1 or n middle names (which is more likely to be 0 or 1) and we use 2 last names mostly, your Father’s comes first, then your Mother’s. Therefore my correct complete name is Gustavo Adolfo Rivera Yeomans, where Gustavo is my first name, Adolfo my middle name, and Rivera Yeomans is my last name, composed of both my parent’s lastnames.

The problem I guess in this letters is that the standard on their system is not prepared for this kind of name and it doesn’t recognize all of them as one. Since each company/person you give your name types it differently, and systems recognizes it differently. I’ve been having problems with this kind of stuff for the driver’s license, airlines tickets, etc. And if you have an accented name, the problems are worse!

Then I started to work on a project and while I was thinking about our registration, I thought about what kind of validations a Name Field should have, I was thinking about the obvious

  • No emptiness
  • Min. chars.
  • Max. chars.
  • We should allow accented words, but what else should we accept? what else shold we reject?.

I remembered I have friends, also from México, that have just one Last name, contrary to what’s common there, and I heard that they have had problems with some systems there when doing paperwork on Government offices and/or hiring services, etc. in México, systems developers assume we all have 2 last names.

I did a quick search and I found a couple of different, very interesting, articles about name validations, and it turned out that I was wrong about some. Even having problems myself with my name I didn’t realized that before. The articles I read basically say: “You can validate whatever you want but leave names alone”. And for pretty good reasons.

First article was about Facebook blocking a user account of a Hawaiian user that used his real name, that happened to
be Chase Nahooikaikakeolamauloaokalani Silva. It seems that Facebook blocked him because the name didn’t met their standards or validations and marked it as invalid, which is not, because the Name is his real, legal name. But what was wrong there? too long? too many vowels together? I don’t know.

The second article is titled “Falsehoods Programmers Believe About Names” and it gives examples of incorrect assumptions we all (not just programmers) do about names, thinking of what is the standard name on our Countries or culture.

The link to the article is this one
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/

In conclusion I now think that we have to leave Name field alone, and as open as possible. Do we maybe just avoid numbers? not sure, do you know any region, tradition where a person can be named with numbers? what do our DB technology supports on terms of length?. How about reserved chars.? We should escape them correctly in terms of allowing them to be type in this field. What do you think? Please leave me a comment below.

2 thoughts on “Validations of the Name Field

  1. I agree with “leave names alone” for the most part, but that may not work for government, or official needs. In this case it would be nice if there was an option to state country origin of naming (or the like) to clarify what kind of tradition or syntax your name will use, which controls what kind of fields show or are allowed. Then again, not all names follow these rules, so it’s a hard one.
    Just don’t allow emojis!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.