Skip to main content
Version: Released

Validation and Errors

Validation management

When the user has finished to create his configuration project, he can follow through the purchase step.

When doing so, we send a "configuratorValidated" event with all the necessary information about the current project.

Event nameInput / OutputPayloadReason
configuratorValidatedInput eventSee the description below.Retrieve all the necessary information for an Add to cart purchase

Example

configurator.addEventListener("configuratorValidated", (event) => {
console.log(event.detail);
// Here your code to follow through an Add to cart purchase
});

Payload description

Attribute nameTypeContent
nameStringThe name of the configuration project
bomSee bom dedicated page 🔗The BOM object.
projectInfoSee project info dedicated page 🔗The Project info.

Error management

You can listen to an event that will let you know that an error occurred during the initialization or the validation of the Storage Configurator. For example if the requested project does not exist. With this, you can choose to display your custom error screen and hide the configurator.

Event nameInput / OutputPayloadReason
configuratorErrorOutput eventJavascript "Error" objectAn error occurred during the initialization.

Example

configurator.addEventListener("configuratorError", (event) => {
console.log(event.detail.message);
});