Commit a260c5f
committed
fix(isMobilePhone): fix 'ms-MY' regexp
refactored the regexp:
---
* removed meaningless {1} quantifiers
* simplified regexp a bit (removing useless escape character)
* fixed the bug that would cause it to match invalid numbers
tests
---
* added tests for invalid numbers
fixes #10661 parent f97e8d4 commit a260c5f
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8593 | 8593 | | |
8594 | 8594 | | |
8595 | 8595 | | |
| 8596 | + | |
| 8597 | + | |
8596 | 8598 | | |
8597 | 8599 | | |
8598 | 8600 | | |
| |||
0 commit comments