How to “Validate” Human Names in CakePHP?

后端 未结 4 501
梦谈多话
梦谈多话 2020-11-28 16:06

I have a PHP script that is supposed to check for \"valid\" human names, but recently cracked against a name with a space, so we added spaces to our validator.
Rather th

4条回答
  •  情话喂你
    2020-11-28 16:54

    There is no way to "validate". How can you prevent someone really called:

    Robert'); DROP TABLE Students; --

    http://xkcd.com/327/


    EDIT: What I really mean is, people in some countries may have their name in different language (say Japanese, Chinese, Korean) and may even contains symbols. How will you think if a site says your name is "INVALID" when he/she is entering their real names?

提交回复
热议问题