Skip to content

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

@zrubinrattet

Description

@zrubinrattet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions