HTML5 minimum character length validation ignoring spaces and tabs

前端 未结 2 1372
温柔的废话
温柔的废话 2021-01-18 10:17

I am using HTML5 \'pattern\' attribute with \'required\' for validation of input boxes. HTML5\'s required attribute works but it can accept spaces and tabs which is not good

2条回答
  •  青春惊慌失措
    2021-01-18 10:28

     

    this will work for your case .. its exacly how you want it. i have set limit of character is from 6 to 40..

提交回复
热议问题