Open NoirKomBatman opened 3 years ago
My code:
sms = strings.TrimSpace("5215563189961") if sms == "" { return "", errors.WithStack(ErrEmptyPhoneNumber) } number, err := libphonenumber.Parse(sms, DefaultSMSRegion) if err != nil { return out, errors.WithStack(err) } if !libphonenumber.IsValidNumber(number) { return out, errors.WithStack(ErrInvalidPhoneNumber) }
Getting invalid phone number
invalid phone number
My code:
Getting
invalid phone number