perf: utils
parent
6236f59473
commit
da45d15f0d
|
@ -2,6 +2,7 @@
|
|||
* 下载工具模块
|
||||
* 提供多种文件格式的下载功能
|
||||
*/
|
||||
// 请使用 @vben/utils/download 代替 packages/@core/base/shared/src/utils/download.ts
|
||||
|
||||
/**
|
||||
* 图片下载配置接口
|
||||
|
|
|
@ -6,4 +6,3 @@ export * from './formatTime';
|
|||
export * from './formCreate';
|
||||
export * from './rangePickerProps';
|
||||
export * from './routerHelper';
|
||||
export * from './validator';
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// 参数校验,对标 Hutool 的 Validator 工具类
|
||||
|
||||
/** 手机号正则表达式(中国) */
|
||||
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
||||
|
||||
/**
|
||||
* 验证是否为手机号码(中国)
|
||||
*
|
||||
* @param value 值
|
||||
* @returns 是否为手机号码(中国)
|
||||
*/
|
||||
export function isMobile(value?: null | string): boolean {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
return MOBILE_REGEX.test(value);
|
||||
}
|
Loading…
Reference in New Issue