Small fix
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* @param input 输入
|
||||
*/
|
||||
function validPhone(input: string | number): boolean {
|
||||
return /^1\d{10}$/.test(`${input || ''}`);
|
||||
return /^\d+$/.test(`${input || ''}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12,7 +12,7 @@ function validPhone(input: string | number): boolean {
|
||||
* @param input 输入
|
||||
*/
|
||||
function validPhoneInput(input: string | number): boolean {
|
||||
return /^(?:1\d*)?$/.test(`${input || ''}`);
|
||||
return /^\d*$/.test(`${input || ''}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user