Don't use possible number pattern to determine number type
The phone number type determination should never use the possible number pattern, since that pattern is generic and not necessarily specific to the type in question. Update `isNumberMatchingDesc` to always use the national number pattern, not the possible number pattern. Also found and fixed a bug in RegularExpressions matchesEntirely while making this change.
Showing
- PhoneNumberKit/PhoneNumberKit.swift 1 addition, 1 deletionPhoneNumberKit/PhoneNumberKit.swift
- PhoneNumberKit/PhoneNumberParser.swift 16 additions, 26 deletionsPhoneNumberKit/PhoneNumberParser.swift
- PhoneNumberKit/RegularExpressions.swift 3 additions, 16 deletionsPhoneNumberKit/RegularExpressions.swift
- PhoneNumberKitTests/PhoneNumberKitParsingTests.swift 25 additions, 11 deletionsPhoneNumberKitTests/PhoneNumberKitParsingTests.swift
Loading
Please register or sign in to comment