-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(isMobilePhone): add support for Croatia (hr-HR) locale #2672
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
base: master
Are you sure you want to change the base?
Changes from all 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 |
|---|---|---|
|
|
@@ -111,6 +111,7 @@ const phones = { | |
| 'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/, | ||
| 'fr-WF': /^(\+681)?\d{6}$/, | ||
| 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, | ||
| 'hr-HR': /^(\+?385|0)(91|92|95|97|98|99)\d{7}$/, | ||
|
||
| 'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/, | ||
| 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, | ||
| 'ir-IR': /^(\+98|0)?9\d{9}$/, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8054,6 +8054,34 @@ describe('Validators', () => { | |
| '064349089895623459', | ||
| ], | ||
| }, | ||
| { | ||
| locale: 'hr-HR', | ||
| valid: [ | ||
| '+385911234567', | ||
| '+385921234567', | ||
| '+385951234567', | ||
| '+385971234567', | ||
| '+385981234567', | ||
| '+385991234567', | ||
| '385911234567', | ||
| '0911234567', | ||
| '0921234567', | ||
| '0951234567', | ||
| '0971234567', | ||
| '0981234567', | ||
| '0991234567', | ||
| ], | ||
|
Comment on lines
+8060
to
+8073
|
||
| invalid: [ | ||
| '', | ||
| '1234567890', | ||
| '+385901234567', | ||
| '+385931234567', | ||
| '+38591123456', | ||
| '+3859112345678', | ||
| '091123456', | ||
| '09112345678', | ||
| ], | ||
| }, | ||
| { | ||
| locale: 'hu-HU', | ||
| valid: [ | ||
|
|
||
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.
The
isMobilePhoneREADME locale list still contains incorrect locale casing (am-Am,ro-Md) on this line. These don’t match the actual locale keys (am-AM,ro-MD) exported byvalidator.isMobilePhoneLocales, which can mislead consumers copying from the docs. Please correct the locale codes while updating this line.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.
@abhu85 fix these