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

Error: Invalid value, Input field allowing special characters #380

Open
juanfactor88 opened this issue Mar 27, 2023 · 0 comments
Open

Error: Invalid value, Input field allowing special characters #380

juanfactor88 opened this issue Mar 27, 2023 · 0 comments

Comments

@juanfactor88
Copy link

juanfactor88 commented Mar 27, 2023

Describe the bug
The international phone number input is allowing the user to enter special characters when using phone and number keyboard type. This not only doesn't look right visually but, sometimes leads to Invalid Value error when the user saves the value.

Package version
0.7.2

Flutter version
3.7.8

To Reproduce
Steps to reproduce the behavior:

use the example.
String initialCountry = 'US';
PhoneNumber number = PhoneNumber(isoCode: 'US');
keyboard type could be number or phone.
enter 4 numbers, then enter a special character (eg: . * , )
you'll get the invalid input error.

Expected behavior
You should only be able to enter numbers in the field because you're validating phone numbers.

Screenshots

image

image

** Targeted platforms (please complete the following information):**

  • OS [e.g. Android, iOS, ...]
  • Web [✔ or ❌]

Additional context
There should be a way to prevent the user to input anything other than numbers.

@juanfactor88 juanfactor88 changed the title Input field allowing special characters Error: Invalid value, Input field allowing special characters Mar 27, 2023
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