Address Validation Zip comparison is incorrect
nnnnat opened this issue · 2 comments
@Akarshit commented on Tue Nov 27 2018
Type: minor
Describe the bug
The UI that compares the entered address and the suggested address is not showing the comparison correctly when the zip is different in the suggested address.
To Reproduce
Steps to reproduce the behavior:
- Modify the test-address-validation to return
{ suggestedAddresses:
[ { address1: '1075 First Ave',
city: 'King of Prussia',
region: 'PA',
country: 'US',
postal: '19406-1418' } ],
validationErrors:
[ { summary: 'AddressLine1', type: 'AddressLine1' },
{ summary: 'City', type: 'City' } ] }
- Activate address validation via Admin
- Enter the "enterred address" address as shown in the screenshot below.
- After clicking "Save changes" you will be taken to the address comparison screen which shows the error. Observe how the zip is displayed on two separate lines.
Expected behavior
Correct address should be displayed in the "Suggested Address" area.
@cassytaylor after looking into this issue it seems to be just a text wrapping problem with long city names. I feel like the ${city}, ${region} ${postal}
on one line is the standard format but in this example, it makes sense to force the entire postal code to the next line and not break it at the hyphen. How do you feel like we should approach this?
@nnnnat yes! I agree, the postal code should be on its own line.