feat(isMobilePhone): add Palestine ar-PS locale by brendan-c · Pull Request #1767 · validatorjs/validator.js
feat(isMobilePhone) add Palestine validation (ar-PS)
- Added validation for Palestine mobile phone numbers
- Wrote test for Palestine mobile phone number validation
- Updated readme to include ar-PS
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @brendan-c and thank you for your PR! Can you please address my comment below?
| 'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, | ||
| 'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, | ||
| 'ar-OM': /^((\+|00)968)?(9[1-9])\d{6}$/, | ||
| 'ar-PS': /^(\+?970|0)5[8|9](\d{7})$/, |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't prefixes for mobile phone numbers 9 and 6 instead of 8? The only source i can find is this wikipedia article
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Thank you for your efforts 🎉
@brendan-c - please fix the merge conflict and we should be good to go.
Your work is now merged here #1851
profnandaa
changed the title
feat: (isMobilePhone) add Palestine validation
feat(isMobilePhone): add Palestine ar-PS locale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters