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 allows you to perform quality assurance checks on features and review areas of concern as an iterative process.
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 . 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.
Note:
The input workspace for evaluating batch calculation and validation rules depends on the type of geodatabase the dataset with attribute rules is stored in:- File geodatabase—The geodatabase is the input workspace to evaluate.
- Enterprise geodatabase—You must use a feature service with the Validation capability as the input workspace to evaluate. Learn more about sharing data as a feature service with the Validation capability.
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.
- Evaluate the rules.
To learn more, see Share datasets with attribute rules, Evaluate attribute rules, and Manage attribute rule errors.
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 feet, 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.