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

Table questions

Each column can have validation if it has

one of the above question types

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.

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.






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

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

  • No labels