New enum values for isPossibleNumberWithReason

131 views
Skip to first unread message

Lara Rennie

unread,
Feb 9, 2017, 8:12:47 AM2/9/17
to libphonenum...@googlegroups.com
Hi,

If you don't use isPossibleNumberWithReason or port libphonenumber, you can stop reading now.

In version 8.3.0 we are adding some more enum values to ValidationResult, currently returned only by the isPossibleNumberWithReason method. The existing values have had better documentation added at the same time. These new values are not yet being returned but you should take the opportunity to migrate your code to handle them if necessary as soon as possible.

**Note the definitions described will apply in a future release, date TBD, when the enums are actually returned by the function.**

The new values:
IS_POSSIBLE_LOCAL_ONLY: this will be applied to numbers that previously were marked as IS_POSSIBLE but are actually only possible local numbers

INVALID_LENGTH: this will be applied to numbers that are invalid due to their length, but are neither too short not too long.

Examples of changes you may need to make in client code:
- If you want no change in behaviour, and previously accepted IS_POSSIBLE numbers, you should change this to accept those or IS_POSSIBLE_LOCAL_ONLY

- If you showed different error messages depending on the enum, you should add cases for the new enums.

Thanks for reading, and thanks for using libphonenumber!

Lara Rennie

Lara Rennie

unread,
Apr 10, 2017, 9:47:25 AM4/10/17
to libphonenum...@googlegroups.com
Hi all,

The PR has been submitted to now return these new values. This will go live in the next release. See the original post for the changes that you may need to make to handle these.

Lara
Reply all
Reply to author
Forward
0 new messages