What is a reasonable length limit on person “Name” fields?

后端 未结 11 1101
心在旅途
心在旅途 2020-12-22 18:45

I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-22 19:05

    What you're really asking is a related, but substantially different question: how often do I want to truncate names in order to fit them in the database? The answer depends both on the frequency of different lengths of names as well as the maximum lengths chosen. This concern is balanced by the concerns about resources used by the database. Considering how little overhead difference there is between different max lengths for a varchar field I'd generally err on the side of never being forced to truncate a name and make the field as large as I dared.

提交回复
热议问题