Data validation against a pattern
Role of edit validate rules in data validation
In applications, you use validation to minimize the errors that can occur when users submit erroneous data. For example, during case processing, users must enter their Social Security number (SSN). You want to ensure that users enter an SSN in the correct nine-digit format that is divided by hyphens: 111-11-1111. To achieve this validation, you use an edit validate rule, which is a rule type that validates character patterns. When users enter an SSN in the wrong format and click away from the field, an error message is displayed.
Other common types of validation restrict the choices available to users. For example, developers can specify a Date/Time property type to ensure that users enter only a valid date, or determine that a property uses a drop-down list control to limit users to approved choices. In contrast, edit validate rules do not restrict the values that the user can enter; they validate based on the data format.
Edit validate rules are defined on properties, and not on activities or flow actions. Edit validate rules are used for client-side validation, which means that the value users enter is validated immediately without referencing the server. Validation occurs when users make a change to the entered value. To apply an edit validate rule to a property, reference the edit evaluate rule on the Advanced tab of the property rule form, in the Use validate field. The following example shows a property rule for capturing a postal code, with an edit validate rule applied to verify that entered values match the US ZIP Code format.
Check your knowledge with the following interaction.
This Topic is available in the following Module:
Want to help us improve this content?