It's my first ever comment on github, so apologies for any rules breaking.
I have used your library for a greek phone number validation, but unfortunately it doesn't work:
<input id="contactNumber" name="contactNumber" type="text" [(ngModel)]="model.contactNumber" #contactNumber="ngModel" phone="GR">
whereas with "US" country it does.
After debugging your, and libphonenumber, code the "phone/validator.ts" calls the "isValidNumber()" function (with 1 parameter -> {phone: v, country}) which takes the following route:
validate.js --> isValid()
metadata.js --> getTypes()
return metadata[9] -> this is undefined for 'GR', hence 'true' is returned
If i remove the '{ }' and call the 2 parameter overload of that method (such as below), it works.
Hi,
It's my first ever comment on github, so apologies for any rules breaking.
I have used your library for a greek phone number validation, but unfortunately it doesn't work:
<input id="contactNumber" name="contactNumber" type="text" [(ngModel)]="model.contactNumber" #contactNumber="ngModel" phone="GR">
whereas with "US" country it does.After debugging your, and libphonenumber, code the "phone/validator.ts" calls the "isValidNumber()" function (with 1 parameter -> {phone: v, country}) which takes the following route: validate.js --> isValid() metadata.js --> getTypes() return metadata[9] -> this is undefined for 'GR', hence 'true' is returned
If i remove the '{ }' and call the 2 parameter overload of that method (such as below), it works.