Validation rules replaces and extends the old min/max values on number questions, while adding validation of inputs on several new question types, such as dates.

The full list of question type that supports the new validation rules can be seen in the table.

Question typeValidated against

Number

Static number

Date

Fillout date

Date of birth (if subject attribute)

Enrollment date

(+/- offset)

Date/Time

Fillout date

Date of birth (if subject attribute)

Enrollment date

(+/- offset)

Specific time

Static time

Duration

Static number

Multiple ChoiceSelected possibilities
Multiple ResponseSelected possibilities
Yes/NoSelected possibilities
SmileySelected possibilities

Table questions

Each column can have validation if it has

one of the above question types

Offset

Offset is found on date + date/time questions and allows one to "move" the date validated against. E.g.: Enrollment + 7 days, would have the input date be validated against the subjects enrollment date + 7 days. If the subject was enrolled on the 1st of April in the example the validated date would be the 8th of April.

Where as if you use -7 the date would move in the other direction

Rules:

A validation rule can have one of three consequences when broken:

  • Block Answer: Will block the form from being saved, so long as the answer breaks the rule.
  • Show Warning: Will allow the answer to be saved, but will display a warning text in orange colour. The warning text can be specified by the user, if nothing is specified it will use a default text.

  • Generate Query: Will create a query on the answer, and notify anyone with the “Query Permission”. The creator of the query will be denoted as “System generated query”

To match the old system of min/max values, it requires two validation rules with the block consequence. The system will automatically create these, if you had any existing min/max values.

 Validation rules are added during form creation, the Validation Rules tab will appear underneath the question for supported question types.

To add a new rule click “Add Validation rule”

The validation rules should ideally be filled in from left to right. The comment text is optional, if no text is entered the system will use a default text (which can be seen in the Comment text field, once the rule has been created).

Note that for free text questions the validation rules have not changed. Just like before they allow the user to limit the number of characters that can be entered.


Possibility question operators:

The possibility type questions have a set of operators that are explained in the following paragraph.

Multiple choice, Yes/No, and Smiley scale uses the operators "Any" and "Not any". If you use "Any" it means that should the user select any of the preselected possibilities the rule will trigger. Using "Not Any" means that if the user does NOT select any of preselected possibilities then the rule will trigger. 

E.g.: "If Answer is Any of Yes then show a warning", if the user then selects 'Yes' during fill out, the warning will show.


Multiple response is a special case, as here multiple possibilities can be selected when answering the question.

There are therefore four operators: Any, Not Any, All, Not All. Below are illustrations of when each of these four operators are triggered and e.g. a warning is shown.

The orange square denotes the subset selected during the setup of the validation rule.

The arrows denote the possibilities selected during data collection

In each of the examples we have four possibilities in the multiple response question


Includes All

If the " Includes All" operator is used, the ENTIRE subset must be selected by the user during fill out, for the rule to trigger.


Not Include All


If the "Not include All" operator is used, the rule will trigger if the ENTIRE subset is NOT selected during fill out.

Includes Any

If the "Includes Any" operator is used, the rule will be triggered if at least ONE of the possibilities included in the subset is selected during fill out

Not Include Any

If the "Not Include Any" operator is used the rule will be triggered if NONE of the subset is selected during fill out



Can't find the answer you're looking for?

Don't hesitate to raise a support request via support@smart-trial.co.

  • No labels