Skip to content

getSectionValidation(): TSectionValidation

The getSectionValidation method allows to validate the shipping section of the basket.

Returned value

A returned value has a type of TSectionValidation.

Example

In this example we make a basketShippingsApi call to validate the shipping section of the basket.

useStorefront(async ({ eventBus, getApi }) => {
    eventBus.on('basket.initialized', async () => {
        const basketShippingsApi = await getApi('basketShippingsApi');

        const sectionValidation = basketShippingsApi.getSectionValidation();
    });
});

Basket Address API methods reference

Objects reference