Can we limit phone number validations to only accept mobile numbers?

CHT uses google-libphonenumber to validate phone numbers when adding a person and other places.

CHT accepts fixed-line numbers as valid by default. But we can’t send text messages to fixed-line numbers in some countries. This is causing messages to those numbers to fail.

I have noticed that google-libphonenumber tells you if it’s a FIXED_LINE number:

For example:
Fixed Line:

****Validation Results:****
Result from isPossibleNumber(): true
Result from isValidNumber(): true
Phone Number region: NP
Result from getNumberType(): FIXED_LINE
Result from getNumberType(): MOBILE

Can we use this information to make the phone validation only support mobile phone numbers?

1 Like

Hi @binod , we’ve an open issue in CHT to exactly address this problem. The discussion on the issue also addresses the possiblity to implement this. We may need to wait for the issue to be prioritized.

1 Like