ngx-custom-validators
ngx-custom-validators copied to clipboard
Support phone number validation
Adding support for validating a phone number would be helpful.
In order to have a phone validators, I would have to include phonelib.
If more people ask for this, I will do it but my first goal is having a lightweight package without third party or library.
Ralf, could you have a phonevalidator:
- testing the existence of the library phonelib
- if present, use it
- if not, either do nothing or raise an error
Cheers mate ;) /tm
Third the request. I tried moving to ngx-custom-validators as ng2-validator wasnt being updated. The switch was smooth, except for the phone validator. Will be very helpfull.
Upgraded to Angular 9 and ng2-validator gave errors. Would be helpful to have it in as phone number is a common field type so it probably belongs in here.
A branch with libphonenumber-js
exists with the phone validation.
Unfortunately, it has an issue... 0668744565 (locale FR) is valid and should works but validation errors is not updated.
All TU passed btw.