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

New Serbian Format Not supported #820

Open
4 tasks done
relliott2016 opened this issue Dec 12, 2024 · 1 comment
Open
4 tasks done

New Serbian Format Not supported #820

relliott2016 opened this issue Dec 12, 2024 · 1 comment

Comments

@relliott2016
Copy link

relliott2016 commented Dec 12, 2024

New Issue Checklist

  • Updated PhoneNumberKit to the latest version

  • Phone number formatted correctly on JavaScript version

  • I searched for existing GitHub issues

  • I am aware that this library is not responsible of adding/removing/changing phone number formats and any request should be done at libphonenumber repo

  • Apparently there are two Serbian phone number formats. The second and most recent format adds an extra digit and Phonenumberkit does not recognize the number as a valid number.

  • We were running v3.8.0 and updated to v4.0.1 with no luck.

Steps to reproduce

+381 xxxxxxxxx (9 digits plus 381)

Expected result

Valid phone number

Actual result

Invalid phone number

Environment

SPM on iOS

@relliott2016
Copy link
Author

Checklist complete. JavaScript result indicates a valid number format.

Parsing Result:
{"country_code":381,"national_number":616378296,"raw_input":"381616378296","country_code_source":10}

Validation Results:
Result from isPossibleNumber(): true
Result from isValidNumber(): true
Result from isValidNumberForRegion(): true
Phone Number region: RS
Result from getNumberType(): MOBILE

Formatting Results:
E164 format: +381616378296
Original format: 381 61 6378296
National format: 061 6378296
International format: +381 61 6378296
Out-of-country format from US: 011 381 61 6378296
Out-of-country format from Switzerland: 00 381 61 6378296
Format for mobile dialing (calling from US): +381 61 6378296
Format for national dialing with preferred carrier code and empty fallback carrier code: 061 6378296

AsYouTypeFormatter Results
Char entered: 3 Output: 3
Char entered: 8 Output: 38
Char entered: 1 Output: 381
Char entered: 6 Output: 3816
Char entered: 1 Output: 38161
Char entered: 6 Output: 381616
Char entered: 3 Output: 3816163
Char entered: 7 Output: 38161637
Char entered: 8 Output: 381616378
Char entered: 2 Output: 3816163782
Char entered: 9 Output: 38161637829
Char entered: 6 Output: 381616378296

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

1 participant