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

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

Description

@giridat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions