Skip to content

Invalid address - "Name" is required even when it is present #2511

Description

@frosso

Description

When validating the origin address, the message "We were unable to automatically verify the address — Name is required." could appear even when the "name" is already filled.
Screen Shot 2021-12-02 at 2 47 54 PM

It looks like in

$address = $data['address'];
$company = $address['company'];
$phone = $address['phone'];
unset( $address['company'], $address['phone'] );
$body = array(
'destination' => $address,
);
$response = $this->api_client->send_address_normalization_request( $body );
we are stripping out the name field from the validation - maybe that's related?

Steps to reproduce

  • Go to the order's page
  • Click "Create new label" to open the modal
  • In the "Origin" address, enter (space) on the "name" field
  • Click "Verify address"
  • Click "Edit address" again, to edit the address
  • Fill in the details of the "Name" field with "Test Tester"
  • Click "Verify address" again
  • The message "We were unable to automatically verify the address — Name is required." appears, even tho the "name" field is populated

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions