HTML5 form required attribute. Set custom validation message?

前端 未结 14 1892
你的背包
你的背包 2020-11-22 01:26

I\'ve got the following HTML5 form: http://jsfiddle.net/nfgfP/

14条回答
  •  离开以前
    2020-11-22 01:48

    I have made a small library to ease changing and translating the error messages. You can even change the texts by error type which is currently not available using title in Chrome or x-moz-errormessage in Firefox. Go check it out on GitHub, and give feedback.

    It's used like:

    
    

    There's a demo available at jsFiddle.

提交回复
热议问题