sync
This commit is contained in:
@ -44,7 +44,13 @@ function isEmail(text) {
|
||||
}
|
||||
|
||||
function isPhone(text) {
|
||||
return /^[1-9]\d{9,}$/.test(text);
|
||||
if (/^[1-9]\d{9,}$/.test(text)) {
|
||||
return true;
|
||||
}
|
||||
if (/^\+?[1-9][\d-]{9,}\d$/.test(text) && /^[1-9]\d{9,}$/.test(text.replace('+', '').replace(new RegExp('-', 'g'), ''))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export {
|
||||
|
Reference in New Issue
Block a user