Skip to content

The length of the mobile number based on country (Indonesia) is not correct (Edit: Required Range validation 9 to 11) #189

@kcs-govindtank

Description

@kcs-govindtank

While Indonesia has 11 digits as their mobile number, the library gives it error that the length is not correct.

My logic is configured with the below code;

bool validation(BuildContext context) {
int? countryWiseLength;
if (country != null) {
countryWiseLength = country?.example.length;
}
//show message if countryWiseLength doesn't match
}

while deep dive, found that the country.example.length for Indonesia (+62) is 9 digits instead of (officially) 9/10/11 (different based on the states of the Indonesia).

{
"e164_cc": "62",
"iso2_cc": "ID",
"e164_sc": 0,
"geographic": true,
"level": 1,
"name": "Indonesia",
"example": "812345678",
"display_name": "Indonesia (ID) [+62]",
"full_example_with_plus_sign": "+62812345678",
"display_name_no_e164_cc": "Indonesia (ID)",
"e164_key": "62-ID-0",
},

Please fix it @Daniel-Ioannou ASAP or provide alternative solution, which can help to resolve the issue.

I got the issue in this right now, I might suggest to look for other countries as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions