Constraint dictionary
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZAAAB
1
constraintconstraint_messageexample responsenotesresources
2
Constraining integer and decimal.>=5Answer must be greater than or equal to 55
3
.<3Answer must be less than 32
4
.=${name}Answer must be equal to previous questionIf previous question = '10', an appropriate response to current question would be '10'Replace red text in constraint with the name of the question the answer must be equal to. Replace red text in constraint_message with appropriate reference to the question it must be equal to.
5
.!=8Answer must not be 87The '!' before the '=' indicates NOT. != means 'must not equal'
6
.>=1 and .<=10Answer must be between 1 and 103
7
regex(., '^[0-9]{2}$') and (.>=00 or .<=80) Must enter a 2-digit number between 00 - 8072Response allows numbers between 0 and 9 because of [0-9]. To constrain further, modify numbers inside of bracket. Response requires 2 digits because of {2}. To require a different amount of digits, modify the number inside the curly bracket. The $ indicates the end, therefore the input will not allow additional entry past this point. Remove the '$' to allow further non-constrained input after this point. The response must meet both constraints mentioned, because of the and. If you require the input to meet one constraint, but not the other, change 'and' to 'or'.regexr.com
8
Constraining textregex(.,'[a-zA-Z]{3}[0-9]{2}$')Answer must contain 3 letters and 2 numberscDe87Response is case insensive because of [a-zA-Z]. Remove the 'a-z' to require all capital letters, or remove the 'A-Z' to requre all lowercase letters. Response requires 3 letters because of {3}, and 2 numbers because of {2}. Modify what's inside the curly brackets to require a different number of letters and/or numbers. Input allows any digit between 0 and 9 because of [0-9]. Modify what's inside the brackets to modify the numbers allowed. The $ indicates the end, therefore the input will not allow additional entry past this point. Remove the '$' to allow further non-constrained input after this point.regexr.com
9
.=${name}Answer must be equal to previous questionIf previous question = 'elephant', an appropriate response to current question would be 'elephant'Replace red text in constraint with the name of the question the answer must be equal to. Replace red text in constraint_message with appropriate reference to the question it must be equal to.
10
string-length(.)<=250You've exceeded the maximum characters of 250
11
string-length(.)>2Must enter at least 3 characters
12
regex(., "^[A-Z]{2}$")Answer must be two capital letters
13
Constraining date
. >= date('2017-05-01') and . <= date('2017-06-30')
Answer must be between May 1 2017 and June 30 20172017-06-02This constraint works well with the 'date' type, which is a date picker. The user will see a calendar view to select the date, but the value saved is in this format: YYYY-MM-DD. To constrain between different dates, change the red text to customize.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
Main menu