Skip to content

[WEB] Error: The string supplied did not seem to be a phone number #23

Description

@aytunch

Hi @natintosh
I use the below api with number = '4' and isoCode='en'
I know that 4 is not a valid number but the user is typing in to a search box and I have to call parse at every key stroke.
final parsedNumber = await PhoneNumberUtil.normalizePhoneNumber(number, isoCode);
and this throws an exception. Is this expected behavior? Shouldn't we just get a null String returned instead?

Screenshot 2023-03-02 at 00 39 00

The error text right before the exception is from https://github.com/natintosh/plugin_libphonenumber/blob/main/libphonenumber_web/web/js/libphonenumber.js
NOT_A_NUMBER:"The string supplied did not seem to be a phone number"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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