Advice on how to validate names and surnames using regex

前端 未结 3 1408
我在风中等你
我在风中等你 2021-01-07 05:22

I want to validate name and surname for my Ruby on Rails 3 application and so I have posted this question. Someone adviced me to read the Falsehoods Progra

3条回答
  •  旧时难觅i
    2021-01-07 05:54

    If you have read that article, you have seen that it is not possible to validate a name, with or without regular expressions.

    So don't even go there. If people want to call themselves Tarquin Fin-tim-lin-bin-whin-bim-lim-bus-stop-F'tang-F'tang-Olé-Biscuitbarrel (it has happened! see the section "Cultural references"), who are you to deny it to them?

提交回复
热议问题