📅  最后修改于: 2022-03-11 15:04:20.209000             🧑  作者: Mango
$.validator.addMethod(
"regex",
function(value, element, regexp) {
var re = new RegExp(regexp);
return this.optional(element) || re.test(value);
},
"Please check your input."
);