> 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/service-backup-of-types/validation-rule.md).

# Validation 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.

{% stepper %}
{% step %}

## Add a "Rule" type action

Add an action with the type = Rule (1).

![](/files/55b021b05de99280d667d319079906752af409be)

See more info about creating Actions in [Working with Actions](/automations/global-actions-and-action-groups/basics/working-with-actions.md) article.
{% endstep %}

{% step %}

## Enter an error message

Enter Error message (2):

![](/files/c0c4942414a04ff4f8d35ce119317d673f88722d)

This text will be shown to the user if conditions entered are true.
{% endstep %}

{% step %}

## Enter validation rules

Enter rules for Validation Rule to fire (3).

Select the type: Query, Formula or 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.

![](/files/22d1365ebf5ab1dfd619248107295fd69a0610c3)
{% endstep %}
{% endstepper %}
