📜  创建自己的规则 jquery - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:59.448000             🧑  作者: Mango

代码示例1
jQuery.validator.addMethod("domain", function(value, element) {

  return this.optional(element) || /^http:\/\/mycorporatedomain.com/.test(value);

}, "Please specify the correct domain for your documents");