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

Validation issue with Belarusian phone numbers (Country Code: BY) #461

Open
TaSha-spec opened this issue Jan 22, 2025 · 0 comments
Open

Comments

@TaSha-spec
Copy link

Describe the bug
The package intl_phone_number_input incorrectly validates Belarusian phone numbers. Currently, the library requires numbers with the country code BY to have at least 10 digits. However, valid Belarusian numbers only contain 9 digits after the country code (e.g., +375291234567).

Package version
intl_phone_number_input: ^0.7.4

Flutter version
This widget is integrated as a custom widget in Flutter Flow.

To Reproduce
Steps to reproduce the behavior:
Add the widget to your app.
Select Belarus (BY) as the country.
Input a valid number with 9 digits (e.g., +375291234567).
Observe the validation error stating the number is invalid.

Expected behavior
The number +375291234567 (9 digits) should pass validation as it is a valid Belarusian number.

Image

Screenshots
If applicable, add screenshots to help explain your problem.

** Targeted platforms (please complete the following information):**
-OS: Android, iOS
Web: Not tested

Additional context
The issue appears to stem from the library's internal validation rules for Belarusian phone numbers. Adjusting the validation logic to allow 9-digit numbers for country code BY would resolve this problem.

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