Skip to content

Conversation

@Anrufliste
Copy link
Collaborator

Prepare new class PhoneNumberValidator - currently just reusing PhoneLibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.

…LibWrapper to access PhoneLib logic. First testcase set taken from PhoneNumberNormalizer as starting point. Define expected behaviour and outcomment all testcases which currently do not work.

Those can be used to test logic addition to capture more detailed behaviour than phone lib. After standard cases work, next phase will be to include special testcases from PhoneNumberUtil test folder.
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…ed results for 110 and 112 short code tests.

Also add test to check a subscriber number is not starting with a digit equaling NAC, when (used) NDC not mandatory.
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
…d link to issues reported to google

Added new issue for 115 and updated issue status information.
…g Validation Code to handle short code definition via prefix and length (range instead of a single one)
…n Code to handle short code definition which marks a short code as reserve (not valid at all) and introducing a new result type: INVALID_RESERVE_NUMBER
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…C of a city) but for mobile numbers (NDC of a mobile network) see https://issuetracker.google.com/issues/341947688 - testcases in IsPossibleNumberWithReasonTest and IsValidNumberTest are adapted.
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
…d link to issues reported to google

Added new issue for 115 and updated issue status information.
…g Validation Code to handle short code definition via prefix and length (range instead of a single one)
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…t code because it is usable with NDC and from outside of germany with IDP+CC (for last case IS_POSSIBLE_INTERNATIONAL_ONLY is used).
…kShortCodeOverlapping method and introduce ShortCodeUseable enum, to controll the usage of the isUsable... functions of the numberplan object.
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
1) USING IDP & CC
1a) From Foreign Country
1b) Within the Country
2) Not Using IDP & CC
2a) Region is not Using NAC
2b) Region may use Nac
2bI) NAC and NDC is used
2bII) No NAC is used
Therefore also adapting the German NDC generating scripts.
Therefore also adapting the German NDC generating scripts.
… to corresponding testcases.

Furthermore, marked testcases where a bug report needs to be created.
fixes test in IsValidNumberTest for those
@Anrufliste
Copy link
Collaborator Author

replacing #103

@Anrufliste Anrufliste added the experimental Not intended to be merged soon label Jul 19, 2025
…NDC are identified as reserved since they should not be extracted as NDC generally.
…ted test accordingly to 015xxx (other mobile are still missing and broken, after asserting coding is working now)
…Extractor.

Update 15 mobile and prepare 15 infix

Still To do 16, 17, 180 and 199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental Not intended to be merged soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants