Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on United Kingdom number 7911 123456 #260

Open
inchrvndr opened this issue Apr 1, 2020 · 3 comments
Open

Bug on United Kingdom number 7911 123456 #260

inchrvndr opened this issue Apr 1, 2020 · 3 comments
Labels
bug bug that needs to be fixed

Comments

@inchrvndr
Copy link

The underlying libphonenumber validates 7911123456 of United Kingdom to "true" while the stackblitz demo of ngx-intl-tel-input fails.

I've verified the same at http://libphonenumber.appspot.com/
Phone number : 7911123456
Default Country : GB ( CLDR two-letter region code)

@pasevin pasevin added the bug bug that needs to be fixed label Apr 10, 2020
@pasevin
Copy link
Collaborator

pasevin commented Apr 10, 2020

Looks like you're right. We are using the latest libphonenumber lib, so it's not coming from it.
I traced this to another library which we rely upon: int-tel-input.
https://intl-tel-input.com/node_modules/intl-tel-input/examples/gen/is-valid-number.html

To fix this we will need to update ngx-intl-tel-input to use the latest intl-tel-input.

The problem is that it breaks a lot of things in our library if just dropped in.
It will take some time to look into this. If anyone can do this, PRs are welcome.

@pasevin pasevin pinned this issue Apr 10, 2020
@kapsrox
Copy link

kapsrox commented Aug 9, 2020

if you update with intl-tel-input latest version. you need to add prefix iti__ in classes which belongs to intl-tel-input
I guess bold class placed with existing and issue will resolve
(ngx-intl-tel-input/projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.html)
`<div class="iti iti--allow-dropdown"
[ngClass]="separateDialCodeClass">
<div class="iti__flag-container"
dropdown
[ngClass]="{'disabled': disabled}"
[isDisabled]="disabled">


<div class="iti__flag"
[ngClass]="selectedCountry?.flagClass"
[tooltip]="selectedCountry ? selectedCountry[tooltipField] : ''">

<div *ngIf="separateDialCode"
class="selected-dial-code">+{{selectedCountry.dialCode}}


<div *dropdownMenu
class="dropdown-menu country-dropdown">
<div class="search-container"
*ngIf="searchCountryFlag && searchCountryField">
<input id="country-search-box"
[(ngModel)]="countrySearchText"
(keyup)="searchCountry()"
(click)="$event.stopPropagation()"
[placeholder]="searchCountryPlaceholder"
autofocus>

<ul class="iti__country-list"
#countryList>
<li class="iti__country"
*ngFor="let country of preferredCountriesInDropDown"
(click)="onCountrySelect(country, focusable)"
[id]="country.iso2">

<div class="iti__flag"
[ngClass]="country.flagClass">


{{country.name}}
+{{country.dialCode}}

<li class="divider"
*ngIf="preferredCountriesInDropDown?.length">
<li class="iti__country"
*ngFor="let country of allCountries"
(click)="onCountrySelect(country, focusable)"
[id]="country.iso2">

<div class="iti__flag"
[ngClass]="country.flagClass">


{{country.name}}
+{{country.dialCode}}




<input type="tel"
[id]="inputId"
autocomplete="off"
[ngClass]="cssClass"
(blur)="onTouched()"
(keypress)="onInputKeyPress($event)"
[(ngModel)]="phoneNumber"
(ngModelChange)="onPhoneNumberChange()"
[disabled]="disabled"
[placeholder]="separateDialCodePlaceHolder(selectedCountry?.placeHolder || '')"
[attr.maxLength]="maxLength"
[attr.validation]="phoneValidation"
#focusable>

`

@reynirf
Copy link

reynirf commented Dec 18, 2023

Any plan on updating this? There are multiple phone numbers that are invalid for this library because of an outdated version of intl-tel-input, which makes the package unusable in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug that needs to be fixed
Projects
None yet
Development

No branches or pull requests

4 participants