> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/automations/global-actions-and-action-groups/types/rule.md).

# Rule

### Overview

Rule (Validation Rule action) allows apply complex validation rules. User can configure rules and when they are met system fill through exception message.

If the rule is a part of the Action Group and validation fails - other actions in the group will not be executed.

### Configuration

This action has generic properties, as other global actions:

* **Name** - give Action a name in order to search for it easy, otherwise system will use ID of this Action.
* **Type** (Rule or Action) - this is mandatory. Select "Rule".
* **ID** - given by system after saving a new Action first time.
* **Status** - you can activate or deactivate an action temporary (e.g., for debug).
* **Context Object Type** - a data source which fields can be used in Action [conditions](/automations/queries-and-conditions/working-with-conditions/conditions-overview.md) and properties.

<figure><img src="/files/Z7u2A9AkGmQyqNDbe7UJ" alt=""><figcaption></figcaption></figure>

Other settings are specific:

* **Error message** - this text will be shown to the user if conditions entered return **true**.

<figure><img src="/files/SFus2gfwP58Dt6aCBuqJ" alt=""><figcaption></figcaption></figure>

Conditions (actually rules to be validated):

* They can have one of these **types**: Query, Formula, Flow Step Status and Apex Call. Each type allows to specify rules in specific way. See more details on working with Conditions in [Working with Conditions](/automations/queries-and-conditions/working-with-conditions.md) article.

<figure><img src="/files/dVCUsY0AjsaPejCnhT0M" alt=""><figcaption></figcaption></figure>
