-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated mobile phone number validator and test #1167
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ const phones = { | |
'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, | ||
'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, | ||
'ar-TN': /^(\+?216)?[2459]\d{7}$/, | ||
'bs-BA': /^((((\+|0{2})3876)|06)[0-6])((?<=4)\d{7}|(?<!4)\d{6})$/, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this regex could be simplified? Please check how the rest were written... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can rewrite and simplify it, but with that, this regex will leave out some forms of mobile phone numbers which are valid in my country. Its your choice :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I see. I'll take this in... |
||
'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, | ||
'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, | ||
'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a little typo, locale is
bs-BA
and notba-BS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops D-:
I'll update it :-D