ngx-international-phone-number icon indicating copy to clipboard operation
ngx-international-phone-number copied to clipboard

Bad validation on delete phone number

Open noemienicolas opened this issue 5 years ago • 0 comments

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

onCreateForm_empty_ok

When write a valid phone number --> validForm is OK

ok

When i remove the phone number --> validForm is KO

onDelete_only_phone_number_ko

noemienicolas avatar Apr 16 '19 23:04 noemienicolas