How to validate both Chinese (unicode) and English name?

前端 未结 5 1314
说谎
说谎 2021-02-01 10:14

I have a multilingual website (Chinese and English).

I like to validate a text field (name field) in javascript. I have the following code so far.

var c         


        
5条回答
  •  既然无缘
    2021-02-01 10:37

    Take a look at Regex Unicode blocks.

    You can use this to take care of CJK names.

提交回复
热议问题