Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Japanese mobile phone number #1073

Merged
merged 2 commits into from Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/isMobilePhone.js
Expand Up @@ -58,7 +58,7 @@ const phones = {
'hu-HU': /^(\+?36)(20|30|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})$/,
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
'ja-JP': /^(\+?81|0)[789]0[ \-]?[1-9]\d{2}[ \-]?\d{5}$/,
'ja-JP': /^(\+?81|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
'kk-KZ': /^(\+?7|8)?7\d{9}$/,
'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
Expand Down
10 changes: 6 additions & 4 deletions test/validators.js
Expand Up @@ -4779,9 +4779,12 @@ describe('Validators', () => {
{
locale: 'ja-JP',
valid: [
'09012345688',
'090 123 45678',
'+8190-123-45678',
'09012345678',
'08012345678',
'07012345678',
'06012345678',
'090 1234 5678',
'+8190-1234-5678',
],
invalid: [
'12345',
Expand All @@ -4794,7 +4797,6 @@ describe('Validators', () => {
'03_1234_5689',
'0312345678',
'0721234567',
'08002345678',
'06 1234 5678',
'072 123 4567',
'0729 12 3456',
Expand Down