We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/* * 识别电话号码,可以是多种格式的: * 1,区号+号码,可以没有“-” * 2,号码(7-8位) * 3,号码-分机号,中间必须有“-” * 4,区号+号码+分机号 * 5,多个电话号码,每个可以是以上4中之一,可以指定分隔符,默认为“,”分割。 * */
isPhone=function(v,split){ split=split||','; v=v.split(split); for(var i= 0,len= v.length;i<len;i++){ if(! /^(0\d{2,3})*-?[1-9]\d{6,7}(-\d{1,8})*$/.test(v[i])){ return false; } } return true; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
/*
* 识别电话号码,可以是多种格式的:
* 1,区号+号码,可以没有“-”
* 2,号码(7-8位)
* 3,号码-分机号,中间必须有“-”
* 4,区号+号码+分机号
* 5,多个电话号码,每个可以是以上4中之一,可以指定分隔符,默认为“,”分割。
* */
The text was updated successfully, but these errors were encountered: