mirror of https://gitee.com/y_project/RuoYi.git
增加16号段的电话号码验证
parent
260feb7cef
commit
27dee2a63a
|
@ -8,7 +8,7 @@ $(document).ready(function(){
|
||||||
//手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
|
//手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
|
||||||
jQuery.validator.addMethod("isPhone",function(value,element){
|
jQuery.validator.addMethod("isPhone",function(value,element){
|
||||||
var length = value.length;
|
var length = value.length;
|
||||||
var phone=/^1[3|4|5|7|8][0-9]\d{8}$/;
|
var phone=/^1[3|4|5|6|7|8][0-9]\d{8}$/;
|
||||||
return this.optional(element)||(length == 11 && phone.test(value));
|
return this.optional(element)||(length == 11 && phone.test(value));
|
||||||
},"请填写正确的11位手机号");
|
},"请填写正确的11位手机号");
|
||||||
//电话号码验证
|
//电话号码验证
|
||||||
|
|
Loading…
Reference in New Issue