新增进件管理
This commit is contained in:
@@ -299,4 +299,18 @@ export function includesString(target, searchStr, options = {}) {
|
||||
|
||||
// 4. 执行包含判断
|
||||
return processedTarget.includes(processedSearch);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验手机号码(中国大陆)
|
||||
* - 支持 11 位手机号,号段 13x-19x
|
||||
* @param {string} phone
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isValidMobile(phone: string): boolean {
|
||||
if (!phone && phone !== 0) return false;
|
||||
const s = String(phone).trim();
|
||||
// 中国大陆手机号正则:以1开头,第二位3-9,后面9位数字,总共11位
|
||||
const mobileRegex = /^1[3-9]\d{9}$/;
|
||||
return mobileRegex.test(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user