rsaenen / ngx-custom-validators

Angular custom directives for validation
129 stars 55 forks source link

Support phone number validation #10

Open YZahringer opened 6 years ago

YZahringer commented 6 years ago

Adding support for validating a phone number would be helpful.

rsaenen commented 6 years ago

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.

kktos commented 5 years ago

Ralf, could you have a phonevalidator:

Cheers mate ;) /tm

vaduveerappan commented 4 years ago

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.

juanreynolds commented 4 years ago

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.

rsaenen commented 4 years ago

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.