Open noblemfd opened 3 years ago
Any updates on this?
Also, it would be nice to have a reason why the phone number failed the validation in the return object of the form control. Ej. Missing x digits or there are too many digits, Invalid number, etc
Example 1: ` {
"validation": { "isValid": false, "reason": "Invalid Number" }, "phone": { "number": "000000000000000", "internationalNumber": "+34 000000000000000", "nationalNumber": "000000000000000", "e164Number": "+34000000000000000", "countryCode": "ES", "dialCode": "+34" } } `
Example 2:
{ "validatePhoneNumber": { "valid": false, "reason": "Invalid Number" } }
:+1: in here
Is input valid: true Is input touched: true Is form valid: true Form value: { "phone": { "number": "76989 58481----", "internationalNumber": "+91 76989 58481", "nationalNumber": "076989 58481", "countryCode": "IN", "dialCode": "+91" } }
"number": "76989 58481----", this not valid phone number right but still it is showing Is input valid: true <ngx-intl-tel-input [cssClass]="'custom-intl-tel-input'" [preferredCountries]="preferredCountries" [enableAutoCountrySelect]="true" [enablePlaceholder]="false" [searchCountryFlag]="true" [searchCountryField]="[SearchCountryField.Iso2, SearchCountryField.Name]" [selectFirstCountry]="false" [selectedCountryISO]="countryName" [maxLength]="15" [phoneValidation]="true" [separateDialCode]="true" [numberFormat]="PhoneNumberFormat.National" formControlName="phone">
any special character should not be accept in input filed
In my Angular-11, I am using ngx-intl-tel-input
Typescript:
It is not displaying any validation message whenever there is error.
How do I resolve this?
Thanks