// 手机号码
isMobile : function(s) {
return this.test(s, /^(180|1|133|134|153|181)\d{8}$/);
},
// 电话号码
isPhone : function(s) {
return this.test(s, /^[0-9]{3,4}\-[0-9]{7,8}$/);
},
// 邮编
isPostCode : function(s) {
return this.test(s, /^[1-9][0-9]{5}$/);
},
// 数字
isNumber : function(s, d) {
return !isNaN(s.nodeType == 1 ? s.value : s)
&& (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
},
// 判断是否为空
isEmpty : function(s) {
return !jQuery.isEmptyObject(s);
},
// 正则匹配
test : function(s, p) {
s = s.nodeType == 1 ? s.value : s;
return new RegExp(p).test(s);
}
};
Copyright © 2019- ykmd.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务