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

Getting formatted phone number bug #191

Open
brascene opened this issue Feb 1, 2022 · 0 comments
Open

Getting formatted phone number bug #191

brascene opened this issue Feb 1, 2022 · 0 comments

Comments

@brascene
Copy link

brascene commented Feb 1, 2022

Description
After selecting the country and filling out the phone number, I'm unable to get formatted phone string value using phoneNumberTextField.getFormattedPhoneNumber(format: <FPNFormat>, I'm getting "+(null)(null)" with any format option.

To Reproduce
Steps to reproduce the behaviour:

  1. Implement the basic version of the lib
  2. Select country
  3. Enter phone number
  4. Try to get formatted phone number using getFormattedPhoneNumber function

Expected behaviour
I should get back the string with full phone number, with country code.

Device info:

  • Device: iPhone11
  • OS: iOS 15.2

FlagPhoneNumber version:

  • Version 0.8.0

Additional context
Also, I get null for the getRawPhoneNumber() function. So I managed to resolve this with using the raw text property on the TextField, removing spaces and minus signs, and getting the country code with phoneNumberTextField.selectedCountry?.phoneCode.

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