mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
[type] raf (#2699)
This commit is contained in:
4
packages/utils/validate/mobile.ts
Normal file
4
packages/utils/validate/mobile.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export default function mobile(value: string): boolean {
|
||||
value = value.replace(/[^-|\d]/g, '');
|
||||
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
||||
}
|
Reference in New Issue
Block a user