HTML5 form validation pattern alphanumeric with spaces?

后端 未结 7 2134
借酒劲吻你
借酒劲吻你 2020-12-08 00:10

I have the following input tag in my html5 form:

7条回答
  •  误落风尘
    2020-12-08 00:58

    My solution is to cover all the range of diacritics:

    ([A-z0-9À-ž\s]){2,}
    

    A-z - this is for all latin characters

    0-9 - this is for all digits

    À-ž - this is for all diacritics

    \s - this is for spaces

    {2,} - string needs to be at least 2 characters long

提交回复
热议问题