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

when international address is verified, the country code key in the form state variable is not set #24

Open
zrubinrattet opened this issue May 20, 2023 · 1 comment

Comments

@zrubinrattet
Copy link

zrubinrattet commented May 20, 2023

See https://github.com/lob/react-address-autocomplete/blob/main/src/AddressForm/AddressFormInternational.js#L85

Steps to reproduce:

  1. Add AddressFormInternational component
  2. Completely fill out a valid non-US address, then make Address Line 1 something fake (eg: 123 fake st)
  3. Submit the form
  4. Receive error
  5. Update Address Line 1 with the valid value
  6. Submit the form
  7. Receive error:

Uncaught (in promise) Error: Expected countryCode to be of type string
at validateArguments (verify.js:36:1)
at verifyInternational (verify.js:89:1)
at handleSubmit (AddressFormInternational.js:78:1)

Any thoughts on a fix or workaround? Thanks

@Thexumaker
Copy link
Contributor

I took a look at this. I don't think this is an explicit error. I think the error is a bit unclear but international verifications require a country code.

I'm no longer working on this but @amaan-lob or @vmangwani might be able to answer this question a bit better.

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

No branches or pull requests

2 participants