Chapter 8. String and Integer Constraints

Table of Contents

8.1. String Constraint
8.2. Integer Constraint

These specify a condition that must be satisfied for the data to be considered valid. It allows provides the capability of including extra contraints with other attribute values.

8.1. String Constraint

The constraint dialog for string type is accessed in the following ways:

  • From the main window showing the form controls, right click or double click on INPUT to open the Input properties window.

  • Then, from Input properties window that shows Data type : String, click on the "Edit constraint" button.

The constraint dialog for string type contains the followings pre-defined constraints:

  • length: lower and upper limit for the string's length.

  • must [not] start with: Enter a space separated list of strings.The value of the attribute must [not] start with one of these strings.

  • must [not] contain: Choose whether or not the value must [not] contain one or all the specified strings. Enter a space-separated list of strings.

  • Attribute value =: Enter a space separated list of values. The value of the attribute must be equal [not equal] to at least one of these values. Other string attributes can be added using the combobox on the right. In this case, this is the value of the attribute that is used for the comparison. Note that If the string entered matches the name of an attribute, the same previous mechanism is applied.

  • Attribute value !=: same principle as previous, but with "not equal" assertion.

  • All characters allowed: When this radio button is selected, any character is authorized. Some sets of characters can be prohibited by checking the checkboxes on the right or by typing them in the following input field. Be careful not to use a prohibited character in another constraint in the right.

    • lower case: means character list: "abcdefghijklmnopqrstuvwxyz".

    • Upper case: means character list: "ABCDEFGHIJKLMNOPQRSTUVWXYZ".

    • Numbers: means number list: "0123456789".

    • Spaces: blank and tabulation characters

    • Accents: means character list: "àâäéèêëìîïòôöùûüç".

  • No character allowed: same principle as previous constraint but with opposite assertion: No character allowed.