# Handle Validation Failures and Continue Scenario Execution

## Problem

As a user, I want to report on validations which fail, but I’d also like to use workaround steps if possible to move past the error when it occurs.

## Resolution

Create a validation which also includes the steps to overcome the issue and move forward.

### Verification Snippet

<div id="bkmrk-var-visibilityresult" style="border-width:1px;"><div>```
var visibilityResult = isVisible(small(["Enter valid Date of Birth"]));
if (visibilityResult){    	
  setValue(textbox('DateofBirthMask'),'01011955');
};
assertFalse(visibilityResult);
```

 </div> </div>#### Explanation

1. Check if something is visible
2. If it is visible, then proceed with workaround step(s)
3. Then return a verification failure if the item checking for was visible using assertFalse(visibilityResult);
 
<div id="bkmrk-many-other-asserts-t"><div>Many other asserts types exist. For a complete list, see [Assert and Verify Functions.](https://docs.appvance.net/Content/AIQ/TechRef/TestDesignerAPIRef/API_References_New/Assert_Verify/AssertVerifyFunctions_Main.htm)

 </div> </div>##### Why is the assertion last?

- As a user, you would like to check for the existence of an issue…
- But before sending the result back (where the script or AISG will continue running)
- You would like to recover from the issue and work around it if possible.
- This means you
    
    
    - First check for the existence of the issue,
    - And if it exists, handle the issue,
    - And only then after it’s handled, return the failure status back to the script.
- If the assertion were first,
    
    
    - Then the subsequent steps would be skipped, as a failure result would occur,
    - And the remaining steps would be skipped.
 
## Steps

### Option A: Example Using SmartTag Validations

- SmartTag validations are triggered either pre- or post- interacting with associated SmartTag(s)
- In this example, after an action against the **svBtnAddToList** SmartTag, the **failIfValidEffectiveDateMsgExistsAndHandle** validation triggers
 
<div id="bkmrk-for-additional-infor"><div>For additional information about SmartTag Validations see Validations in [SmartTag Workbench.](https://docs.appvance.net/Content/AIQ/TestDesigner/SmartTagWorkbench/Smart_Tag_Workbench.htm)

 </div> </div>#### SmartTag Validation Assignment

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/dOBx6m4tdE987nUK-824f1941cdde.png)#### SmartTag Validation Post-Action Trigger

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/VmdjeqJ2esUOLyax-52e77e7a569e.png)#### SmartTag Validation Usage

This SmartTag automatically triggers when a Test Designer IDE script, JS Edit &amp; Play script or AISG uses the svBtnAddToList SmartTag.

- JavaScript  
    `click(svBtnAddToList('Add To List'));`
- Test Designer IDE
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/hns5mDEQhZUhYFDc-f1d61fa97468.png)
- AISG
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/u2bvidO9dZbFyPEr-2a4591bc7ae6.png)
 
### Option B: Example using Validation Workbench

#### Validation Configuration

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/flQEYvEzA384i9OP-000da82c7265.png)#### Validation Usage

The **Trigger by** type in this example is a **Manual Call**, allowing you to call the validation from a script or AISG simply using **Validate** as follows:

- JavaScript  
    `validate(“verifyDobAutoYearUpdate”);`
- Test Designer IDE
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4q094XX6nP8xUFGa-1495a09956d8.png)
- AISG
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/LzWt099JjhCgUALI-34412256dbb2.png)
 
<div id="bkmrk-for-additional-infor-1"><div>For additional information about triggers see “Trigger By:” in [Validation Workbench](/books/validation-workbench-knowledge-base/page/validation-workbench)

 </div> </div><div id="bkmrk-last-updated%3A-august">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">August 25, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>