As a library administrator, you can configure data validation rules for custom properties. This ensures that the values entered by users follow the conventions specific to your organization.
You can configure data validation rules for the following property types: Integer, Decimal, Person, String and Category.
Note: You can't configure data validation for custom properties whose values are calculated with conditional logic. However, you can configure data validation for custom properties that are conditionally hidden or mandatory. Learn more: What is conditional logic?
Tip: You can also configure help text for these property types, to guide users on the values to enter. Learn more: Configure help text for custom properties.
Automatically generated table of contents
Access the document class configuration
1. Access the library administration.
2. Select Document classes.
3. Click the name of the document class you want to configure or select Configure document class in the More actions menu. The document class configuration page opens.
4. Click the expand button next to a property to view its settings.
You can configure data validation for the following property types:
Data validation on Number (integer and decimal) properties
Integer and Decimal type properties can have the following data validation rules:
- Greater than
- Greater than or equal to
- Less than
- Less than or equal to
The following configuration restricts the property value to a value that is greater than zero and less than or equal to ten thousand.
Data validation on Person properties
You can restrict Person type properties to users who are defined in a role or Google group. This means that only users belonging to a role or Google group can be specified for the property.
Note: When end users define a value for the property, the autocomplete is restricted to users belonging to the Google group or role defined in the Restricted to field.
The following configuration restricts the property Manager to users belonging to the library’s Contract managers role.
If a user enters a person who doesn’t match the restriction, the message defined in the Error message to display field appears in red in the user interface. In addition, any incorrect values are highlighted in red.
Tip: Use the Description and Error message to display fields to to guide users on the values to enter.
Data validation on String properties
You can configure String type properties to force users to enter text following a certain pattern. This pattern is defined using a regular expression. Regular expressions allow you to define the content and format of the string.
The following configuration forces the property value to follow the regular expression: [A-Z]{3}\d{5}
This corresponds to three capital letters followed by five digits.
If a user enters a string that doesn’t match the regex (regular expression) the message defined in the Error message to display field appears in red in the interface:
Data validation for Categories
You can configure Categories to force users to select the deepest sub-level of the category hierarchy. Activate the switch Enforce selection of deepest possible category sublevel.
Consistency between data validation rules and templates
Data validation rules must be consistent with any property values defined in templates for the current document class.
If you try to save a validation rule that is inconsistent with one or more existing property values in templates, a dialog appears indicating the template in which the invalid values exist. You can clear the invalid values in the templates or cancel and edit your validation rule.