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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed isMobile (ja-JP) #1166

Merged
merged 3 commits into from Oct 18, 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 @@ -59,7 +59,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)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
'ja-JP': /^(\+81[ \-]?(\(0\))?|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
8 changes: 8 additions & 0 deletions test/validators.js
Expand Up @@ -4929,6 +4929,10 @@ describe('Validators', () => {
'06012345678',
'090 1234 5678',
'+8190-1234-5678',
'+81 (0)90-1234-5678',
'+819012345678',
'+81-(0)90-1234-5678',
'+81 90 1234 5678',
],
invalid: [
'12345',
Expand All @@ -4949,6 +4953,10 @@ describe('Validators', () => {
'03-1234-5678',
'+81312345678',
'+816-1234-5678',
'+81 090 1234 5678',
'+8109012345678',
'+81-090-1234-5678',
'90 1234 5678',
],
},
{
Expand Down