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

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

I have the following:



        
8条回答
  •  自闭症患者
    2021-02-01 04:36

    I simply use oninvalid to set the custom validty error message and then use onchange to reset the message so the form can submit.

    
    

提交回复
热议问题