A validation action validates a record before it is saved or before / after performing another action. It can contain multiple messages such error or alert .
If an action results in an error ( error) , the following actions are not executed and the corresponding error message is displayed.
If an action results in an alert ( alert ) , a dialog box will appear asking the user for confirmation. The following actions will be performed if necessary.
Example:
<action-validate name="action-sale-order-validate">
<error message="Create Date is in future." if="confirmed && createDate > __date__"/>
<error message="Order Date is in future." if="confirmed && orderDate > __date__"/>
<alert message="No Sale Order Items. Would you like to continue?" if="confirmed && !items"/>
</action-validate>