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

US Number is not getting recognized #129

Open
vishalsanghai opened this issue Oct 22, 2024 · 1 comment
Open

US Number is not getting recognized #129

vishalsanghai opened this issue Oct 22, 2024 · 1 comment

Comments

@vishalsanghai
Copy link

vishalsanghai commented Oct 22, 2024


	phoneNumber := "+15551234567"
	num, err := libphonenumber.Parse(phoneNumber, "")
	if err != nil {
		fmt.Printf("Error parsing phone number: %v\n", err)
		return
	}
	if libphonenumber.IsValidNumber(num) {
		fmt.Println("The phone number is valid.")
	} else {
		fmt.Println("The phone number is not valid.")
	}

Why is this valid US number being marked as not valid?
However another US number works fine : +14155552671

@iqquee
Copy link

iqquee commented Nov 20, 2024

Hello @vishalsanghai,
I am having a similar issue with the recent set of Nigerian number that starts with 091 meanwhile other numbers that starts with 090, 081 and so on works just fine. I would try and address the issue.
Do have a wonderful day

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

2 participants