To use this view, complete the following steps:
- 3.In the Home view, select Validation Scripts
This feature allows you to write a function to validate events in your Assurance session. The function should expect an array of Assurance events and should return:
- A boolean (true or false) OR
- An object that contains a
statusproperty with an optional array of event UUIDs
To execute the code in the code editor, click Validate. The function should return a boolean (true or false) or an object that contains a status property and optionally an array of event UUIDs.
When the view is first loaded, it provides an empty function with JSDoc comments that define how the function accepts the events parameter with the expected return output. Currently, the view allows you to manage several validation scripts by leveraging the browser's cache.
You can create a new validation script by editing the existing script’s name in the drop-down list. To save or delete the script, click Save or Delete.
ERRORstatus is displayed, and the reason for the error is output to the browser's developer console.