ngx-international-phone-number
ngx-international-phone-number copied to clipboard
Bad validation on delete phone number
I put a defaultCountry to the component. When i write a valid phone number the form is valid. If i remove only the phone number without deletng the country, the component is invalid.
<international-phone-number class="inputSize" [(ngModel)]="correspondant.telephoneFixe" [allowDropdown]="true" [defaultCountry]="defaultCountryTelFixe" #telephoneFixeNumber="ngModel" name="telephoneFixe"></international-phone-number>
ngOnInit() { if (this.correspondant) { if (!this.correspondant.telephoneFixe) { this.defaultCountryTelFixe = 'nc'; } } }
When show the page for the first time, with default country --> validForm is OK
When write a valid phone number --> validForm is OK
When i remove the phone number --> validForm is KO