--- title: Optional Address Validation in Storefront API - Shopify developer changelog description: >- Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: 'https://shopify.dev/changelog/optional-address-validation-in-storefront-api' md: >- https://shopify.dev/changelog/optional-address-validation-in-storefront-api.md metadata: effectiveApiVersion: 2024-04 affectedApi: [] primaryTag: displayName: API handle: api secondaryTag: displayName: Update handle: update indicatesActionRequired: false createdAt: '2023-12-19T12:27:32-05:00' postedAt: '2023-12-19T12:09:00-05:00' updatedAt: '2024-12-13T17:24:40-05:00' effectiveAt: '2023-12-19T12:09:00-05:00' --- December 19, 2023 Tags: * API * 2024-04 # Optional Address Validation in Storefront API As of Storefront API's 2024-04 release, you can use `buyerIdentity.deliveryAddressPreferences.deliveryAddressValidationStrategy` (accepted values `STRICT` or `COUNTRY_CODE_ONLY`) to enable address validation on the passed `deliveryAddress` for any cart mutations that accept a buyer identity as input (like `cartCreate`or `cartBuyerIdentityUpdate`). Passing `STRICT` will perform a full validation on the address fields, and will raise `CartUserError`s for invalid addresses. Invalid addresses will not be stored on the cart. Passing `COUNTRY_CODE_ONLY` or omitting the field will only validate the presence of a valid country in the address (unchanged behavior from previous version).