A lot of the comments here seem to assume that a person has only one given name. Where I come from that is almost unheard of, most people have at least two, and this means that the person can choose which one to be known by. My wife used her middle name.
middle name cause lot of troubles in databases in countries which use only two names or even better Chinese characters which have very low limit on amount of characters, most of Americans and other middle name nationalities have issues with their bank accounts and other accounts in China which cause a lot of trouble because you never know how they dealt with middle name in their system, i heard this issue countless times in years there and i can imagine issues even in European countries not used to middle names
> i can imagine issues even in European countries not used to middle names
Are there any? Pretty much everyone I know in Europe has at least two given name and in some cases also two family names (Spain for instance). Here in Norway it is also common to have a first given name that is actually composed of two separate words without a hyphen, it looks like a name plus a middle name but is in fact what Norwegians call a double name and the person is addressed by both never by just one of them, see https://no.wikipedia.org/wiki/Liste_over_norske_dobbeltnavn.
And of course Icelanders don't use family names but instead use patronymics; for instance Björk Guðmundsdóttir where Björk's father's name is Guðmundur Gunnarsson and her mother's is Hildur Rúna Hauksdóttir. They might or might not have middle names.
If you design a user interface that asks for a name please just let the user write the name as they wish with no restrictions on length and please don't try to force a surname into one box and a given name into another and don't forbid hyphens and spaces, etc.