2023-08-13
The tangled problems of asking for people's '(full) legal name'
One response to my entry on the problems with 'first' and 'last' name data fields is that one should make forms that (only) ask for someone's legally recognized name, which should be unambiguous and complete. While superficially appealing, this is a terrible minefield that you should never step into unless you absolutely have to, which is generally because you are legally required to collect this information.
The first question is what you mean by legally recognized name or 'legal name'. I have several pieces of government ID and some well-attested things like credit cards (which are normally supposed to be in your name), and even the government IDs don't always have exactly the same name, never mind the credit cards. Depending on what you're doing with my name and what you need it to match, I would need to give you some different version of it. If I don't know why you're specifically demanding my legal name, I'm going to have to guess which one you need and the one you get may not be the one you want.
(If you really insist on legally recognized names and you deal with non-English people, be prepared to accept all sorts of Unicode input in non-English languages. The true legal name of a Japanese, Chinese, Korean, Egyptian, etc person is not written in Latin characters, and even Western names are not infrequently written with some accented Latin characters. Legal names absolutely do not fit in plain ASCII. If you're asking for 'legal name, but in the Latin alphabet', well, that's certainly something.)
The second issue (not so much a question) is who you are to be demanding to know the name on my government ID. If you ask for my legally recognized name, I am going to require you to explain why you specifically need that, instead of the name that I commonly go by or that I want to give you. If you are doing this to send me friendly greetings, using my full legal name is not the way to do it; you should be using whatever name I want to give you for this. If you're doing this to show my name to other people, even on purely functional grounds I want you to use the name that those people will know me by, not the full, formal legal name I only use in interactions with the government.
(And I'm someone in a position of privilege where it's not particularly dangerous for me to be known to your random service by my real world name (or even my real world picture, not that I want you to have that either). This is very much not always the case for people; real name only policies are toxic and dangerous for various reasons, and forcing them is being evil.)
The third issue is that people not infrequently have good reasons to not be addressed or known by their current legal name but instead by another name of their choice. One example is that in the West, a number of women (although not all) will change their last name under various circumstances. There are situations where the legal change to their chosen new last name will lag the actual desire to use that last name. If you insist on people using their legally recognized name, you're inflicting pain in the same way that not allowing people to change their logins does, and on the flipside you may be forcing people to broadcast changes in their status before they want to.
There are relatively few situations where you actually need to know someone's legally recognized name as opposed to what they want you to call them, and you should never ask for it unless you're actually in one of those situations. Otherwise, you and everyone else is much better off if you simply ask people for their name, in the sense of 'what do you want to be called'.
(And of course you need to allow people to change their name, legal or otherwise, because people's names do change.)