intl_phone_number_input icon indicating copy to clipboard operation
intl_phone_number_input copied to clipboard

initialValue should be populated even for invalid numbers

Open Susheelkaram opened this issue 3 years ago • 2 comments

Describe the bug If phone number passed as initialValue is not a valid phone number, the initialValue is skipped and textfield is left empty. This is problematic in cases when form data is prefilled from existing sources and user won't have a chance to correct the existing wrong phone number. Package version all versions

To Reproduce Steps to reproduce the behavior:

  1. Pass an invalid phone number as initialValue intentionally
  2. Run the app
  3. The textfield will be empty

Expected behavior The textfield should be populated with phone number even if it is not valid. Validation error can be shown if the number is invalid instead.

If you think this change won't be valid in all cases, a flag to enable/ disable this change would also be very useful.

Susheelkaram avatar Mar 25 '21 05:03 Susheelkaram

+1 Or print maybe print an error statement in the terminal telling that the number is not valid so as a developer you would know that your code works and you have to implement an extra check or so :)

bjoerndotsol avatar Jun 04 '21 15:06 bjoerndotsol

Any workaround or solution to this issue yet ?

eswarupkumar avatar Nov 27 '23 09:11 eswarupkumar