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

AddressSheet allows incomplete phone number on Android when phoneNumber = optional #1677

Open
kaitlyn-lighthouse opened this issue Jun 25, 2024 · 0 comments

Comments

@kaitlyn-lighthouse
Copy link

Describe the bug

On Android, passing the prop additionalFields={{ phoneNumber: "optional" }} to the AddressSheet component allows users to submit the address with an incomplete phone number. The expected behavior is what happens on iOS, where the user can submit with a blank phone number, or a valid phone number, but not an incomplete one.

To Reproduce
Steps to reproduce the behavior:

  1. Create an AddressSheet with the prop additionalFields={{ phoneNumber: "optional" }}
  2. Run the app and open the address sheet
  3. Enter a valid address without a phone number. The "Save address" button should not be disabled
  4. Enter an incomplete phone number into the phone number field (e.g., "123"). The "Save address" button should be disabled, but it is not.

Expected behavior
Whenever a valid address (excluding phone number) is already entered, the "Save address" button should be enabled only if the phone number field is empty, or if the phone number entered is the correct length.

Screenshots
Screenshot_20240625-153056

Smartphone:

  • Device: Pixel 7A
  • OS: 14
  • Not in browser, in expo-managed react native app
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