How can I create a custom message when an HTML5 required input pattern does not pass?

前端 未结 8 668
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 04:08

I have the following:



        
8条回答
  •  孤独总比滥情好
    2021-02-01 04:38

    I found that, chrome at least, adds to the message the title of the input automatically, so no extra js is required, see this:

    the input looks like this:

    
    

提交回复
热议问题