Validation Rules
A rule is used to determine whether a case is valid. There are two types of validation rules:
- Single-variable rules. Single-variable rules consist of a fixed set of checks that apply to a single variable, such as checks for out-of-range values. For single-variable rules, valid values can be expressed as a range of values or a list of acceptable values.
- Cross-variable rules. Cross-variable rules are user-defined rules that can be applied to a single variable or a combination of variables. Cross-variable rules are defined by a logical expression that flags invalid values.
Validation rules are saved to the data dictionary of your data file. This allows you to specify a rule once and then reuse it.