Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support New Benin Phone Number Format (Forced Effective November 30, 2024) #77

Closed
ManindraDeMel opened this issue Dec 2, 2024 · 8 comments

Comments

@ManindraDeMel
Copy link
Collaborator

ManindraDeMel commented Dec 2, 2024

Support New Benin Phone Number Format (Effective November 30, 2024)

Description

Benin updated its phone number format on November 30, 2024, to accommodate the increasing number of users. The change includes the addition of the "01" prefix to all existing numbers, extending the total length to 10 digits.

New Format Details:

  • Country Code: +229
  • Prefix: 01 (new)
  • Example Conversion:
    • Old Format: +229 97 00 00 00
    • New Format: +229 01 97 00 00 00

Key Requirements:

  1. Update the library to validate the new 10-digit phone numbers in Benin.
  2. Ensure backward compatibility with the 8-digit numbers by recognizing and converting them into the new format.
  3. Add test cases to verify both existing and new formats.

References:

@ManindraDeMel
Copy link
Collaborator Author

It appears that the changes to support Benin's updated phone number format (effective October 31, 2024) have already been implemented in the metadata. Specifically:

The "01" prefix for 10-digit numbers is present in the patterns.
Legacy 8-digit numbers are still recognized.
Both PhoneMetadataFormatListDefinition and PhoneMetadataPatterns reflect these updates.
However, after testing, the following issues were observed:

Parsing: The library fails to correctly identify or parse some valid 10-digit numbers with the "01" prefix.
Formatting: Numbers that should follow the new 10-digit format are not being formatted as expected (e.g., +229 01 XX XX XX XX).
Validation: Certain valid numbers are incorrectly flagged as invalid.

@ManindraDeMel
Copy link
Collaborator Author

ah, i see in commit 9bb32eb that the changes were made yesterday. When will this be released?

@cedvdb
Copy link
Owner

cedvdb commented Dec 2, 2024

This repo would really benefit from an auto publish action, but I've no time to add that yet.

Will release now.

@ManindraDeMel
Copy link
Collaborator Author

This repo would really benefit from an auto publish action, but I've no time to add that yet.

Will release now.

Happy to do the work for it if you wanted to assign me the ticket?

@cedvdb
Copy link
Owner

cedvdb commented Dec 2, 2024

There is this issue #73 . Do you want / need write access ?

@ManindraDeMel
Copy link
Collaborator Author

There is this issue #73 . Do you want / need write access ?

yeah for the ENV

@cedvdb
Copy link
Owner

cedvdb commented Dec 2, 2024

I do not think you need write access for this (but I sent you an invite anyway).

I added the following configuration to the package on pub.dev

image

here is publish.yml example

name: Publish to pub.dev

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
  publish:
    permissions:
      id-token: write # Required for authentication using OIDC
    uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
    # with:
    #   working-directory: path/to/package/within/repository

@ManindraDeMel
Copy link
Collaborator Author

Cool thanks ill get on it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants