# Omniscript validation, error messages and recovery paths

*Omnistudio Consultant Study Guide · Omniscripts · Last updated October 27, 2026 · https://www.certifyforce.com/study-guide/omnistudio-consultant/omniscripts/omniscript-validation-error-messages-and-recovery-paths*

How to layer Omniscript validation (Required, Pattern versus Mask, Messaging, Set Errors and the action Validation property), how to replace technical errors from remote calls with friendly messages, and how to design recovery paths such as conditional error Steps and Restart Omniscript.

- Certification: Salesforce Omnistudio Consultant
- Exam section: Omniscripts
- Study guide: https://www.certifyforce.com/study-guide/omnistudio-consultant

**Official exam objective:**

> Prescribe the implementation of robust validation rules, error messages, and conditional steps to guide users and manage unexpected outcomes or data inconsistencies.

## What the exam expects

- Prescribe the validation layer for each rule: Required, Pattern with Pattern Error Text, Messaging, Set Errors or the action Validation property.
- Explain how users experience Set Errors and where it doesn't work (repeat blocks, custom labels, saved sessions).
- Recommend how technical errors from remote calls become user-friendly messages, and on which runtime each Help page applies.
- Design recovery paths for unexpected outcomes: conditional error Steps, failure button labels and Restart Omniscript.

Key terms: **Pattern** (a simple regular expression with custom error text); **Mask** (an input format that shows the default error); **Messaging element** (messages driven by a validate expression); **Set Errors** (puts errors on earlier-Step elements based on later answers); **Error Messages handler** (replaces remote-call errors); **Restart Omniscript** (a Navigate page reference type that resets the data).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Mask and custom errors | With a Mask on a text field, the default error shows instead of custom ones | [Element Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_omniscript_element_properties_definitions__10687.htm&language=en_US&type=5) |
| Pattern | Simple regex works; complex patterns aren't supported | [Element Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_omniscript_element_properties_definitions__10687.htm&language=en_US&type=5) |
| Messaging in Edit Block | Not supported in LWC Omniscripts | [Display Messages](https://help.salesforce.com/s/articleView?id=xcloud.os_display_messages_in_omniscripts_19551.htm&language=en_US&type=5) |
| Set Errors in repeat blocks | Avoid; use a Messaging element | [Set Errors](https://help.salesforce.com/s/articleView?id=xcloud.os_set_errors_in_an_omniscript_19684.htm&language=en_US&type=5) |
| Set Errors display | Transient per field; sets shown sequentially | [Set Errors](https://help.salesforce.com/s/articleView?id=xcloud.os_set_errors_in_an_omniscript_19684.htm&language=en_US&type=5) |
| Set Errors and saved sessions | Not saved in the data JSON or Saved Session object | [Save and Resume](https://help.salesforce.com/s/articleView?id=sf.os_save_and_resume_an_omniscript_9465.htm&language=en_US&type=5) |
| Action Validation | Step waits for valid required fields; None bypasses | [Action Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_action_element_properties_11090.htm&language=en_US&type=5) |
| Custom Error Message Value | Must match the original error exactly, including spaces | [Customize Error Messages](https://help.salesforce.com/s/articleView?id=xcloud.os_customize_omniscript_error_messages_10378.htm&language=en_US&type=5) |
| Restart Omniscript | New instance of the same Omniscript; data reset | [Navigate Action](https://help.salesforce.com/s/articleView?id=xcloud.os_navigate_action_12710.htm&language=en_US&type=5) |

## Check yourself

- Why does a Pattern beat a Mask when the business dictates the error text?
- When is Set Errors the right validation tool?
- Which Validation setting lets a save-progress button run with empty required fields?
- When should a Navigate action use Restart Omniscript?

## Sources

- [Set Errors in an Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_set_errors_in_an_omniscript_19684.htm&language=en_US&type=5)
- [Display Messages in Omniscripts](https://help.salesforce.com/s/articleView?id=xcloud.os_display_messages_in_omniscripts_19551.htm&language=en_US&type=5)
- [Common Omniscript Element Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_omniscript_element_properties_definitions__10687.htm&language=en_US&type=5)
- [Common Action Element Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_action_element_properties_11090.htm&language=en_US&type=5)
- [Customize Omniscript Error Messages](https://help.salesforce.com/s/articleView?id=xcloud.os_customize_omniscript_error_messages_10378.htm&language=en_US&type=5)
- [Customize Omniscript Error Messages (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_customize_omniscript_error_messages.htm&language=en_US&type=5)
- [Navigate Action](https://help.salesforce.com/s/articleView?id=xcloud.os_navigate_action_12710.htm&language=en_US&type=5)
- [Save and Resume an Omniscript](https://help.salesforce.com/s/articleView?id=sf.os_save_and_resume_an_omniscript_9465.htm&language=en_US&type=5)
- [Add Steps to an Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_steps_15373.htm&language=en_US&type=5)
- [Omniscript Best Practices](https://help.salesforce.com/s/articleView?id=sf.os_omniscript_best_practices_8368.htm&language=en_US&type=5)
- [Conditionally Display Omniscript Elements](https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_display_elements_using_the_conditional_view_property_19389.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Omnistudio Consultant pack (USD $19): https://www.certifyforce.com/practice-exams
