Spree allows anything to be saved in the zipcode field (with little validation), since it has to accept any kind of worldwide zip codes.
That allows users to put heading (or trailing) whitespace in there (very frequent when autofilling or copy/pasting addresses), breaking TaxCloud integration when trying to get the first 5 digits. Striping whitespace right before sending it to TaxCloud solves the issue, without altering whatever's saved in Spree models.
Spree allows anything to be saved in the zipcode field (with little validation), since it has to accept any kind of worldwide zip codes.
That allows users to put heading (or trailing) whitespace in there (very frequent when autofilling or copy/pasting addresses), breaking TaxCloud integration when trying to get the first 5 digits. Striping whitespace right before sending it to TaxCloud solves the issue, without altering whatever's saved in Spree models.