intl_phone_number_input
intl_phone_number_input copied to clipboard
initialValue should be populated even for invalid numbers
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:
- Pass an invalid phone number as
initialValue
intentionally - Run the app
- 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.
+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 :)
Any workaround or solution to this issue yet ?