Axelor Doc

The validation actions

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 &amp;&amp; createDate &gt; __date__"/>
    <error message="Order Date is in future." if="confirmed &amp;&amp; orderDate &gt; __date__"/>
    <alert message="No Sale Order Items. Would you like to continue?" if="confirmed &amp;&amp; !items"/>
</action-validate>