TrevorPilley / phone-number-parser

A .NET library for parsing phone numbers.
MIT License
25 stars 2 forks source link

TryParse ignores calling code #552

Closed TrevorPilley closed 1 year ago

TrevorPilley commented 1 year ago

The TryParse(string value, out IEnumerable<PhoneNumber> phoneNumbers) method incorrectly includes numbers for other countries if value includes a calling code.

PhoneNumber.TryParse("+16054567890", out IEnumerable<PhoneNumber> phoneNumbers)

phoneNumbers should be contain a single phone number:

Instead it also includes: