validator.js
validator.js copied to clipboard
Update isMobilePhone.js
regex pattern for 'fa-IR: '
This updated pattern allows for any digit after '9' and ensures that the phone number starts with '09' and is followed by 9 digits. With this change, the regex pattern will correctly match Iranian mobile phone numbers in the "09xx xxx xxxx" format.
Refer: [https://en.wikipedia.org/wiki/Telephone_numbers_in_Iran]
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [ ] README updated (where applicable)
- [ ] Tests written (where applicable)
- [x] References provided in PR (where applicable)