webcat12345 / ngx-intl-tel-input

Phone number input field to support international numbers, Angular
MIT License
213 stars 335 forks source link

For phone numbers russians AutoCountrySelect function always setting code Kazakhstan #376

Open Bozonych opened 3 years ago

Bozonych commented 3 years ago

https://github.com/webcat12345/ngx-intl-tel-input/blob/28cf9d8828937cb0dccec1f17b95723c080f93d9/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts#L225

Skyward commented 3 years ago

For me it wrong not always but at first paste number. For example (you can check it even in your stackblitz demo) 1) open page 2) paste number like +79262141212 (or any other Russian number variant) in component input. You will see what component set country Kazakhstan instead Russia and form field (and form) will be invalid. 3) If you re paste the same number - it will work as expected (country Russia, form field valid) 3.1) If you just make any changes by hands - it will work as expected (country Russia, form field valid)

If you open page and write this number by hands - it will work as expected (country Russia, form field valid)

This problem catched with national numbers too. 1) open page 2) Select Russia as country 3) paste number like 89262141212. You will see Kazakhstan and invalid form field again. Select Russia again and re paste number - it will work as expected (country Russia, form field valid)

Kusibab commented 3 years ago

Is there any chance for fixing it? Or some walk-around?