HTML5 form validation pattern alphanumeric with spaces?

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

I have the following input tag in my html5 form:

7条回答
  •  死守一世寂寞
    2020-12-08 00:46

    Use this code to ensure the user doesn't just enter spaces but a valid name:

    pattern="[a-zA-Z][a-zA-Z0-9\s]*"
    

提交回复
热议问题