US & CA default country break each other's AsYouType country detection
Hello, thanks for this very useful library.
I have encountered the following issue when setting the default country to Canada or United States. When the default country is set to CA, the AsYouType class mistakenly reports US numbers as CA numbers. This is true in the other direction too: if US is set as default, then CA numbers are reported as US numbers.
This only applies to numbers written in the national format, there is no issue when the +1 prefix is written.
The AsYouType class might be making an assumption that if the default country's national number template is matched, that means the number belongs to that country, but that is incorrect as the United States and Canada share the +1 code and national number template.
Thank you.
The inconsistency can be seen on this page (Parse is correct, AsYouType is incorrect):
Google's validation agrees with the Parse results, the number is a US number: