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

North Macedonian numbers are wrongly validated #411

Closed
SimeonGrancharov opened this issue Nov 7, 2024 · 3 comments
Closed

North Macedonian numbers are wrongly validated #411

SimeonGrancharov opened this issue Nov 7, 2024 · 3 comments

Comments

@SimeonGrancharov
Copy link

SimeonGrancharov commented Nov 7, 2024

Environment:
react-native@0.67, macOS, ios Simulator

Package version:
3.2.38

Problem:
PhoneNumberUtil.isValidNumber returns false if a number starts with "+3897389"

Implementation:

export function validatePassengerPhone(phone?: string) {
	try {
		const parsed = phoneUtils.parse(phone);

		return phoneUtils.isValidNumber(parsed);
	} catch {
		return false;
	}
}

NOTE:
Tested on the official demo page and there is no issue. The phone number appears as valid under the isValidNumber property

@SimeonGrancharov SimeonGrancharov changed the title Nort Macedonian numbers are wrongly validated North Macedonian numbers are wrongly validated Nov 7, 2024
@SarhaneGhribi
Copy link

@SimeonGrancharov
i have tried to recreate the problem but could not
Screenshot from 2024-11-08 08-57-15

@SimeonGrancharov
Copy link
Author

@SarhaneGhribi Yes that's what I wrote under the NOTE section.

Unfortunately, when using the library in a project, the same number is treated as invalid.

I have referred to the original documentation, and I assume that the metadata for this library is outdated.

@ruimarinho
Copy link
Owner

Please check with google-libphonenumber@3.2.39 which has just been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants