After the initial creation of an element, you can set additional controls in order to complete its definition.
Using the following static controls on a field, you can establish simple validation rules on its content. The controls available for a given field are dependent on its data type.
Fixed length | The exact number of characters required for this field. |
Minimum length | The minimum number of characters allowed for this field. |
Maximum length | The maximum number of characters allowed for this field. |
Pattern | A regular expression pattern that the value of the field must match. It is not possible to simultaneously define a pattern for both a field and its data type. |
Decimal places | The maximum number of decimal places allowed for this field. |
Maximum number of digits | The maximum total number of digits allowed for this integer or decimal field. |
Enumeration | Defines a list of predefined possible values for this field. If enumerations are defined in both a field and its type, then the enumeration of this field in associated datasets is replaced by the intersection of these two enumerations. |
Greater than [constant] | Defines the minimum value allowed for this field. |
Less than [constant] | Defines the maximum value allowed for this field. |
See XML schema supported facets.
Using the following dynamic and contextual controls on an element, you can establish advanced validation rules of its content. The controls available for a given element are dependent on the type of element and its data type, if it has one.
Foreign key constraint | |
Table | Defines the table referenced by the foreign key. A foreign key references a table in the same dataset by default. It can also reference a table in another dataset in the same dataspace, or a dataset in a different dataspace. |
Mode | Location of the table referenced by the foreign key. 'Default': current data model. 'Other dataset': different dataset, in the same dataspace. 'Other dataspace': dataset in a different dataspace. |
Referenced table | XPath expression describing the location of the table. For example, |
Referenced dataset | Required if the table is located in another dataset. The unique name of the dataset containing the referenced table. |
Referenced dataspace | Required if the table is located in another dataspace. The unique name of the dataspace containing the referenced table. |
Label | Defines fields to provide the default and localized labels for records in the table. Allows as well to customize the display of the specified label in breadcrumb. Can also specify a Java class to set the label programmatically if 'XPath expression' is set to 'No'. This Java class must implement the Attention: Access rights defined on associated datasets are not applied when displaying record labels. |
Filter | Defines a foreign key filter using an XPath expression. Can also specify a Java class that implements the |
Greater than [dynamic] | Defines a field to provide the minimum value allowed for this field. |
Less than [dynamic] | Defines a field to provide the maximum value allowed for this field. |
Fixed length [dynamic] | Defines a field to provide the exact number of characters required for this field. |
Minimum length [dynamic] | Defines a field to provide the minimum number of characters allowed for this field. |
Maximum length [dynamic] | Defines a field to provide the maximum number of characters allowed for this field. |
Excluded values | Defines a list of values that are not allowed for this field. |
Excluded segment | Defines an inclusive range of values that are not allowed for this field. Minimum excluded value: Lowest value not allowed for this field. Maximum excluded value: Highest value not allowed for this field. |
Specific constraint (component) | Specifies one or more Java classes that implement the |
Specific enumeration (component) | Specifies a Java class to define an enumeration. The class must define an ordered list of values by implementing the |
Enumeration filled by another node | Defines the possible values of this enumeration using a reference to another list or enumeration element. |
Dataspace set configuration | Define the dataspaces that can be referenced by a field of the type Dataspace identifier (osd:dataspaceKey). If a configuration is not set, then only opened branches can be referenced by this field by default.
|
Dataset set configuration | Define the datasets that can be referenced by a field of the type Dataset identifier (osd:datasetName).
|
Each constraint not using a specific Java class can define localized validation messages with a severity using the following properties:
Validation | Defines a localized validation message with a user-defined severity level. |
Severity | Defines the severity level of the validation message. Possible values are 'Error', 'Warning', and 'Information'. |
Error management policy | Specifies the behavior of the constraint when validation errors occur. It is possible to specify that the constraint must always remain valid after an operation (dataset update, record creation, update or deletion), or when a user submits a form. In this case, any input or operation that would violate the constraint will be rejected and the values will remain unchanged. If not specified, the constraint only blocks errors upon form submission by default, except for foreign key constraints in relational data models where errors are prevented for all operations by default. This option is only available upon static controls, exclude values, exclude segment and foreign key constraints. On foreign key constraints the error management policy does not concern filters. That is, a foreign key constraint is not blocking if a referenced record exists but does not satisfy a foreign key filter. In this case updates are not rejected and a validation error occurs. It is not possible to specify an error management policy on structural constraints that are defined in relational data models, when table history or replication is activated. That is, setting this property on fixed length, maximum length, maximum number of digits and decimal place constraints will raise an error at data model compilation because of the underlying RDBMS blocking constraints validation policy. This property is ineffective when importing archives. That is, all blocking constraints, excepted structural constraints, are always disabled when importing archives. |
Message | Defines the message to display if the value of this field in a dataset does not comply with this constraint. If specifying a custom message, you may optionally provide localized variants. |
User guide table of contents