getSectionValidation(): TSectionValidation¶
The getSectionValidation
method allows to retrieve a validation for the basket summary section.
Returned value¶
A returned value has a type of TSectionValidation
which represents the TSectionValidation object.
Example¶
In this example we make a basketOverallApi
call to retrieve a validation for the basket summary section.
useStorefront(async (storefront) => {
const basketOverallApi = storefront.getApiSync('basketOverallApi');
const sectionValidation = basketOverallApi.getSectionValidation();
if (!sectionValidation.isValid) {
console.log('summary section validation message:', sectionValidation.validationMessage);
}
});
Basket Overall API methods reference¶
- getActions
- selectActions$
- getId
- selectId$
- getComment
- selectComment$
- getIsVatEu
- selectIsVatEu$
- getDelivery
- selectDelivery$
- getSum
- selectSum$
- getSumWithoutPaymentAndShipping
- selectSumWithoutPaymentAndShipping$
- cleanBasket
- setComment
- getInvalidSections
- selectInvalidSections$
- selectSectionValidation$