Field Constraints
You can enforce a particular format on fields associated with a document class by using regular expressions.
To create field constraints
- Right-click a document class and select Configure fields. You can also select a document class, then click Configure fields in the bottom of the Tasks Pane on the right.
- In the General tab of the Configure Fields dialog box, select the name of a field.
- Click Constraint.
- In the Field Constraint dialog box, specify a pattern matching expression that will be used to format the field.
- In the Constraint Violation Message box, specify the message that will be displayed to the user that will inform them that a value is invalid and provide tips for how to specify a valid value.
Example: "Social Security numbers must be in the format ###-##-####."
Example: For a field designed to contain Social Security numbers, you could enter the expression \d\d\d-\d\d-\d\d\d\d to restrict the field to data in the format of digits and dashes of a standard Social Security number.