nyaruka / phonenumbers

GoLang port of Google's libphonenumber library
MIT License
1.23k stars 146 forks source link

Columbia number `+5717701048` is valid while returned as invalid number #174

Closed seaguest closed 3 months ago

seaguest commented 3 months ago

Hi,

This number +5717701048 is valid number if I check on this website but this library returns invalid.

package main

import (
    "fmt"

    "github.com/nyaruka/phonenumbers"
)

func main() {
    // parse our phone number
    num, err := phonenumbers.Parse("+5717701048", "CL")
    fmt.Println(num, err)

    // format it using national format
    formattedNum := phonenumbers.Format(num, phonenumbers.NATIONAL)
    fmt.Println(formattedNum)

    fmt.Println(phonenumbers.IsValidNumberForRegion(num, "CO"))
    return
}
rowanseymour commented 3 months ago

@seaguest we are a port of Google's libphonenumber and according to their website that number is not valid https://libphonenumber.appspot.com/phonenumberparser?number=%2B5717701048&country=CO