jquery validate 例子
2021-08-03 17:56
标签:ast lis ase url value submit hand ali rip Please provide your name, email address (won‘t be published) and a comment Name (required, at least 2 characters) E-Mail (required) URL (optional) Your comment (required) $("#commentForm").validate({ rules: { name: "required", email: { required: true, email: true } }, messages: { name: "Please specify your name", email: { required: "We need your email address to contact you", email: "Your email address must be in the format of name@domain.com" } }, submitHandler: function (form) { form.submit(); } }); 测试结果如下: jquery validate 例子标签:ast lis ase url value submit hand ali rip 原文地址:https://www.cnblogs.com/keeplearningandsharing/p/14899548.html