yuyang041060120 / ng2-validation

angular2 validation
https://yuyang041060120.github.io/ng2-validation/index.html
MIT License
612 stars 213 forks source link

upgraded to version 4.2.0 causing phone validation to fail for US styled phone numbers: (888) 555-1212 #111

Open tomschreck opened 7 years ago

tomschreck commented 7 years ago

US styled phone numbers are failing validation. I need to have my phone numbers styled as (888) 888-8888. This used to work with version 3.9.0. I've had to revert back to version 3.9.0.

phone-number-validation
tomschreck commented 6 years ago

Still having the same issue. I installed ng2-validation version 4.2.0 and libphonenumber-js version 0.4.43. I have to revert back to ng2-validation version 3.9.0 and libphonenumber-js 0.4.6.

this.DataEntryForm = this.formBuilder.group ({ ... PhoneNumber: [ new asYouType('US').input(this.DataEntryModel.Customer.PhoneNumber), Validators.compose([ Validators.required, CustomValidators.phone('US') ]) ], ...
});

Any idea when this issue will be fixed?