Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Postal Code should be a numeric input #100

Closed
tlovett-rmn opened this issue Nov 20, 2015 · 5 comments
Closed

Postal Code should be a numeric input #100

tlovett-rmn opened this issue Nov 20, 2015 · 5 comments

Comments

@tlovett-rmn
Copy link

In the US, Postal Codes are purely numeric. The current box allows for text and so the keyboard does not default to a numeric keypad. It also allows does not limit to 5 characters or 5-then-4 characters.

Perhaps this is by design for internationalization, but it would be handy for US-only apps to specify a numeric input be used for Postal Code

@tlovett-rmn tlovett-rmn changed the title Postal Code should be a number input Postal Code should be a numeric input Nov 20, 2015
@braebot
Copy link
Member

braebot commented Nov 24, 2015

Sounds like you're looking for another configuration option to restrict the postal code. I would think we should be more generic, and use regex's for folks to use in different countries. Something like a string extra: EXTRA_VALID_POSTAL_CODE_REGEX. The postal code would only be considered valid if it matches the regex. In your case, you'd want the regex from this SO post.

Would this be satisfactory?

@tlovett-rmn
Copy link
Author

I'm less concerned about validating the input -- I can always do that after card.io returns data to me. I'm concerned about the UX that my US users see. I'd like them to get a numeric keypad to enter their zip rather than the default text keyboard since they won't need to enter any letters.

@braebot
Copy link
Member

braebot commented Dec 4, 2015

Hmm. You're suggesting that we restrict to numeric input with a boolean, something like EXTRA_POSTAL_CODE_NUMERIC_ONLY. If this extra is true, we only show the numeric input keyboard. Apparently a lot of countries use numeric only postal codes.

@tlovett-rmn
Copy link
Author

Yeah, exactly! I think it would be a UX improvement that our users would really appreciate.

@braebot
Copy link
Member

braebot commented Jan 15, 2016

Fixed in 5.3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants