Custom Validations
Custom validations enable you to add custom business logic to enforce data rules on your applications, dimensions, node types, and hierarchy sets.
Videos
Your Goal | Watch This Video |
---|---|
Learn about working with and creating custom validations. |
Considerations
- You must have the Owner or Metadata Manager permission on at least the dimension to create, edit, or delete a custom validation.
- Node type validations are executed for all nodes in the viewpoint by node type.
- Hierarchy set validations are executed for all nodes in the viewpoint, as long as the viewpoint is a hierarchy.
- Validations are run on the state of nodes after a request is run (that is, what the node will look like after the request is committed). You cannot run a validation on the state of a node before a request is run.
- Validations are enforced when a request is submitted, approved, committed, or a validation is
performed. The following table describes which custom validations are run when
validations are performed in different contexts:
Validation Context Validations Run Validate a request Custom validations are run for request items that meet either the trigger actions or trigger properties Validate a viewpoint with an open request Custom validations are run for all nodes in the viewpoint, including the request items Validate viewpoint outside of a request Custom validations are run for request items that meet the trigger properties, but not the trigger actions
Custom Validation Example
In this example, we add a validation to the Account node type in the Corporate Planning application that says that all node names must begin with the same character as that node's parent. The following screenshot shows the custom validation that we created.

The validation has this definition:
- The Enabled flag is set to True.
- The expression returns a value of True if the node name starts with the same character as the first character in the node parent's name, and a value of False if it doesn't.
- The trigger actions for the validation are Add and Rename, and the trigger property is Name.
- A failure message indicates that the validation fails if the account node doesn't start with the same character as its parent node.
To test the validation, let's try to submit a request that adds node for the Account node type whose name starts with a character that is different from the first character of its parent. In this case, under the parent node OFS_Total Revenue, we will attempt to add a node named Project Revenue.

When we submit the request, we get a validation error that the node name must begin with the same character as its parent node.