Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

PhoneNumberUtil().validate is not validating many country codes #113

Open
2 of 7 tasks
giridat opened this issue Aug 18, 2023 · 1 comment
Open
2 of 7 tasks

PhoneNumberUtil().validate is not validating many country codes #113

giridat opened this issue Aug 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@giridat
Copy link

giridat commented Aug 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

2.0.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version 10.0.19045.3324], locale en-IN)
    • Flutter version 3.10.6 on channel stable at C:\src\flutter\flutter                          
    • Upstream repository https://github.com/flutter/flutter.git                                  
    • Framework revision f468f3366c (5 weeks ago), 2023-07-12 15:19:05 -0700                      
    • Engine revision cdbeda788a                                                                  
    • Dart version 3.0.6                                                                          
    • DevTools version 2.23.1                                                                     
                                                                                                  
[√] Windows Version (Installed version of Windows is version 10 or higher)                        

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Legion\AppData\Local\Android\Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = C:\Users\Legion\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • Windows (desktop) • windows                                         
    • windows-x64   • Microsoft Windows [Version 10.0.19045.3324]

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Minimal code example

Code sample
 String phone =
          "+3588376877308"; // this cc is not working if I replace it with +91 it will work 
      debugPrint(phone);

      if ((await PhoneNumberUtil()
          .validate(phone, regionCode: selectedCountry.countryCode))) {
             debugPrint("validated");
      } else {
                   debugPrint("couldn't validate");
      }
    }

Current Behavior

Unable to validate many country codes

Expected Behavior

The codes provided should validate.

Steps To Reproduce

  1. Copy the code example above.
  2. run the code with the selected country code
  3. Observe that the particular country code doesn't validate.

Aditional information

I have already been using the main branch as advised in other issues.

phone_number:
git:
url: https://github.com/flutter-form-builder-ecosystem/phone_number.git
ref: main

Screenshot 2023-08-18 115041

@giridat giridat added the bug Something isn't working label Aug 18, 2023
@cjltgb520
Copy link

+5716434737, This number was judged to be invalid, but it was valid after I changed libphonenumber to 8.12.32

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants