Thank you for your observation. I'll inform the appropriate parties that we need to add written demo transcript information to this lesson reference document.
In the meantime, you can find the written information you are seeking directly below the lesson video demos by expanding the >Transcript link below the video portal of that lesson. I've also copied and pasted the Configure a Validate rule and Customize Error Messages demo transcripts associated with that lesson below:
Configure a Validate rule
A validate rule tests input values against conditions defined as part of the rule. Validate rules are most commonly referenced from flow action rules. Let’s have a look at how the validate rule is configured.
In the first column, we specify the properties we want to validate. Then for each property we want to validate, we specify the validation conditions.Click the Edit link to update the validation conditions for the property. Select Required if the user is required to enter a value for the corresponding property. If the property is marked required and the field is blank at runtime the message “This field may not be blank.” is associated with the property. If Enable Conditions is not selected the conditions specified will not run.
A wide range of functions are available to select from. If several conditions are specified, the logical condition between them can be either OR or AND. Specify the message to display if the evaluation of the validation conditions fails. Select Continue Validation if we want the system to continue evaluating subsequent properties even if the current evaluation fails. If a page or page list property is specified a call to another validate record is made for each page. We can specify additional validate rules that we want to run after evaluating the validation settings above. It is possible to define different sets of validation conditions to be applied depending on the value of an input property, a proposed work status, a flow action, or a stage. For example, in the purchase application we can have different validation depending on the cost center.
We can now define validation for cost centers. It is possible to specify a When rule to be applied before evaluating the validation conditions in the column. The default validation is used if the When rule evaluates to false. The first column contains the default validation and is used if none of the property values matches. Let’s have a look how we can use the proposed work status. The typical usage for the proposed work status is to indicate which validation conditions are necessary to pass before the work item can achieve that work status.
The proposed work status is configured on the Validation tab on the flow action. Specify the work status that we want the system to use to determine which validation conditions to apply at runtime for this flow action. We can then configure the validation for each proposed work status in the validate rule. By Specifying the Flow Action Name on the Input tab we can specify validation conditions for flow actions. This enables us to create a single validate rule that can be shared across multiple flow actions. For example, instead of designing a validate rule for each flow action in a screen flow we can define the validation for the entire flow in a single place making it easier to build, edit and maintain. Similarly we can specify the validation on a per stage basis.
Customize Error Messages
We can configure how validation error messages display to users. This is done through the Display Options tab on the harness rule. Form-level errors are reported against properties not present on the current form. By default the messages appear in a standard form-error message section. The error messages can be displayed in three different ways.
Default shows the standard error section both at the top and bottom. Top of harness shows the standard error section at the top of the form only. The configurable section allows us to display the messages in a custom section that we create and place on the harness. Specify the name of the custom section in the Custom Error Section field.
The custom section should contain text to inform users of any errors plus the standard section @baseclass.ErrorList.
Use the Visible When feature on our custom section to make sure it is only shown when the When rule has Messages returns true.
Let’s have a look at field-level errors.
Field-level errors are reported against properties on the current form and can be displayed in two ways. As image with tooltip is the default and displays a red X next to field errors with the error message in a tooltip. As full error text displays the full error text appears next to field errors.
If “Always Show” is selected the standard form-error section is shown even for field-level errors. This means that both field-level and form-level errors display. Select Keep error display visible to cause the entire runtime work item to scroll vertically as a single unit, except for the button bar and the form error area which remains visible at the top.