sync
This commit is contained in:
1 parent
58de68a878
commit
9bf9e7da27
6 files changed
+64
-48
No files matched your search
+7
-1
@@ -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