StudyRules
Defined in: parser/types.ts:155
The StudyRules are used to define a study's constraints to determine whether a participant can take the study. If the criteria are not met, a warning message will be displayed. Below is an example of a StudyRules entry in your study configuration file:
{
"studyRules": {
"display": {
"minHeight": 400,
"minWidth": 800
},
"browsers": {
"allowed": [
{
"name": "chrome",
"minVersion": 100
},
{
"name": "firefox",
"minVersion": 100
},
{
"name": "safari",
"minVersion": 10
}
],
"blockedMessage": "This study can only run in chrome, firefox, or safari. (<-- if blockedMesage is not set, a default message is displayed)"
},
"devices": {
"allowed": ["tablet", "desktop", "mobile"],
"blockedMessage": "... (<-- if blockedMesage is not set, a default message is displayed)"
},
"inputs": {
"allowed": ["touch", "mouse"],
"blockedMessage": "... (<-- if blockedMesage is not set, a default message is displayed)"
}
}
}
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
browsers? | BrowserRules | Browser constraints | parser/types.ts:159 |
devices? | DeviceRules | Browser constraints | parser/types.ts:161 |
display? | DisplayRules | Display size constraints | parser/types.ts:157 |
inputs? | InputRules | Input constraints | parser/types.ts:163 |