Describe the bug
After the pull request merge 3 days ago, the validator package breaks the site on iOS devices. I am just importing the validator package in a Vue CLI 3 built project.
import validator from 'validator'
The app works fine on Windows, Linux, and Android, but breaks on macOS devices. It throws the following error:
[Error] SyntaxError: Invalid regular expression: invalid group specifier name
eval (chunk-vendors.js:5232)
./node_modules/validator/lib/isMobilePhone.js (chunk-vendors.js:5232)
_webpack_require_ (app.js:85)
Eval Code
eval
./node_modules/validator/index.js (chunk-vendors.js:4524)
_webpack_require_ (app.js:85)
Eval Code
eval
./src/mixins/validation.js (app.js:728)
_webpack_require_ (app.js:85)
Eval Code
eval
./src/main.js (app.js:692)
_webpack_require_ (app.js:85)
Eval Code
eval
(anonymous function) (app.js:811)
_webpack_require_ (app.js:85)
checkDeferredModules (app.js:46)
(anonymous function) (app.js:222)
Global Code (app.js:223)
It seems like one of the exports isMobilePhone.js is using look behind in one of the regular expressions (I guess look behinds are nor supported in iOS), which stops the code from doing anything and breaks the site upon entering it.
It works on
Windows, Android, Linux, Chrome and, macOS
It doesn't work on
Safari on macOS and any browser on iOS
Examples
Here's a screenshot of the console:

Additional context
Validator.js version: 13.1.1
OS platform: [macOS]
Please confirm that this is 13.1.1, this was fixed, the issue was on 13.1.0
@profnandaa and @nadirabbas I will try to do an investigation on this issue.
I found too this problem on 13.1.0. Updating to 13.1.1 resolves it.
Thanks
Most helpful comment
I found too this problem on 13.1.0. Updating to 13.1.1 resolves it.