Help ensure submitted forms are complete and correct using validation.
Validation is set up for each control through the control settings.
Validation can check that:
Validation only works on controls that are visible to the user.
For a detailed explanation of validation see:
Since alert messages are placed next to the formula space it's possible to think, "if this is true then display the error." It's actually the opposite.
Formulas must resolve as 'true' to PASS validation and NOT display the messge.
This is consistent with the way formulas are used throughout Orbeon.
In the form displayed to the user:
It's designed this way because:
When a user skips a required field or enters something incorrectly:
Users will not be able to submit their form until all messages are cleared.
The default alert message is, "Missing or incorrect value".
Consider providing a message that is more specific to help the user correct the problem like, "Password must be at least 8 characters."
This information may have been provided in the hint text, but some users may not have read it clearly or paid attention to it, and the hint will be hidden by the alert.
To change an alert message:
It's recommended that all fields on a form, with a few exceptions, are marked as required.
To make a field required:
Remember that:
Data type validations ensure that data entered into a field is a certain type, such as boolean, email address, integer, or others. The data type is preset based on the type of control it is and won't need to be changed in nearly all circumstances, but it can be if you need it.
Common constraints can vary depending on the type of control and data type selected. They provide a shortcut to defining some sort of limitation to the data entered, saving you the task of defining that limitation with a formula. For example, the common constraints of a text field are the minimum and maximum length (number of characters).
You can also use a formula to determine if data entered is valid. Common uses are to ensure that:
Let's say that your form includes a set of values for childcare spaces separated by age range. Each control has an Initial Value of zero, which is valid for any given range. However, you want the value of at least one of these ranges to be one or higher. In other words, the total number of spaces must be at least one. You can set up a hidden or non-visible field called facilitySeats that sums up the total of seats across the ranges.