FlagPhoneNumber icon indicating copy to clipboard operation
FlagPhoneNumber copied to clipboard

getFormattedPhoneNumber returns invalid phone string

Open mgray88 opened this issue 6 years ago • 1 comments

Describe the bug getFormattedPhoneNumber returns an invalid phone string

To Reproduce Steps to reproduce the behavior:

  1. Call set(phoneNumber:) with a valid phone string
  2. Use the keyboard to delete all text from the text field
  3. getFormattedPhoneNumber(format: .E164) returns "+(null)(null)"

Expected behavior Expect getFormattedPhoneNumber to return null if the phone number is invalid

Smartphone (please complete the following information):

  • Device: iPhone 5s
  • OS: iOS 10.3.4

FlagPhoneNumber (please complete the following information):

  • Version 0.7.6

mgray88 avatar Aug 23 '19 16:08 mgray88

Actually, set(phoneNumber:) isn't even required, getFormattedPhoneNumber returns the invalid string regardless

mgray88 avatar Aug 23 '19 16:08 mgray88