In the validations, you can add conditions that must be fulfilled within a form for an element. For example, if a field is required to be completed, or if other validation is needed, besides just being required, you can add your conditions to validate.
If the element has a visibility condition, and it is not visible in the form, the required validations and custom validations won't be executed.
The check box will determine whether the element will be required or not.


On the first screen, you have a checkbox that if checked, verifies that the field is not empty.
In addition, you have a button to add validations, which can be more than one.
For each validation, you have to set the validation condition and the message that will appear on the screen if the field does not accomplish the condition.
The condition can reference other fields using the & character. If the operators "and" or "or" are used, both sides of the condition must be wrapped between parenthesis. E.g.,: (Condition_1) and ((Condition_2) or (Consition_3)).
&Value should be used to reference the current field.
&Today can be used to reference the current date, DateSum(&value, days, months, years) to operate with dates and 0 is the value of an empty date.
For check box elements, the value '0' means false, and '1' means true (for true you can also set the element itself with no value, like &HasFavouriteBand).
Some examples:
- &StartDate <= &Value
There is a simple element whose reference id is 'StartDate'. In the EndDate element, this validation is added. So that when adding a value for EndDate, the validation executes
- DateSum(&Value, 0, 0, 18) < &Today
This expression checks whether the element that contains the validation is 18 years old or older.
- ((&Value = "") and (&HasFavouriteBand)) or (&HasFavouriteBand <> 0)
This is like a conditional 'Is required', where a simple element of type check box has the reference id 'HasFavouriteBand'
-
((&PayBy = "Credit card" ) and (&Value <> "")) or ((&PayBy = "Cash") and (&PaymentDate > 0))
There is a simple element whose reference id is 'PayBy' and has two predefined options: 'Credit card' and 'Wire'. This element will check that it is not empty when 'PayBy' is 'Credit card', and that the PaymentDate is not empty when 'PayBy' is 'Cash'.
When you write '&' and a letter in the validation condition, a list of the reference id elements that contain that letter will appear so that you can select from the list.

|