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-defined 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 as the data owner by accessing the dataset from an enterprise geodatabase database connection. After rules are configured, they must be shared as web feature layers to be consumed via services. Editing and rule evaluation occur at the service level using the web feature layer.
The following are the general steps involved in configuring and evaluating validation rules:
- Add the validation 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 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 examples of validation attribute rules:
- Concatenate an array of text field values into a specified field.
- When a pipe's LifeCycleStatus is updated to Abandoned, the PressureZone attribute is updated to None.
- When a power pole has a length greater than 65 feet, the material value will be calculated as steel.
- When a new pole is created, generate a new assetID based on a sequence.