Commit f9d49fc
authored
fix(isMobilePhone): fix 'ms-MY' regexp (#2155)
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 d61322c commit f9d49fc
2 files changed
+3
-1
lines changed| 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