Validation attribute rules

Validation rules specify permissible attribute configurations and general relationships on a feature. They are used to check features in a dataset based on a specific requirement or constraint. The rule evaluation occurs for existing features at a user-specified time, and if rules are violated, error features are created. This process allow you to perform quality assurance checks on features and review areas of concern as an iterative process.

Create, share, and evaluate validation rules

Validation rules are configured on datasets in an enterprise geodatabase. The workspace must be set to Branch in the geodatabase connection properties.

Note:
Batch calculation and validation attribute rules are only supported on point, line, and polygon feature classes or tables.

Validation rules are created in the Attribute Rules view by clicking the Validation Rule button Validation Rules. Rules can also be created using the Add Attribute Rule or Import Attribute Rules tool.

To evaluate validation rules for a dataset, you can use the Evaluate Rules tool or the Error Inspector. The data source must be from a feature service that has the Validation capability enabled.

The following are the general steps involved in configuring and evaluating validation rules:

  • Add the attribute rule to the dataset.
  • Share the dataset as a web feature layer with the Validation capability enabled.
  • Make edits to the web feature layer.
  • Evaluate the rules and check features using the Error Inspector.
  • Review the error features and make edits to correct the errors.
  • Re-evaluate the rules.

To learn more, see Share datasets with attribute rules and Evaluate attribute rules.

Examples

The following are examples of how validation attribute rules can be used in a geodatabase:

  • An attribute value (string) must be a specified number of characters in length.
  • For hydrant features, ensure the size of the valve is greater than or equal to a certain diameter.
  • If the height of a power pole is greater than 65, the material must be set to Steel.

Reference the Arcade profile for the requirements and global variables to author attribute rule types. The Arcade Getting Started guide and Function Index are additional resources to begin constructing script expressions for attribute rules.

See specific examples for attribute rule script expressions