Skip to main content
Version: v2.4.0

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

PropertyTypeDescriptionDefined in
browsers?BrowserRulesBrowser constraintsparser/types.ts:159
devices?DeviceRulesBrowser constraintsparser/types.ts:161
display?DisplayRulesDisplay size constraintsparser/types.ts:157
inputs?InputRulesInput constraintsparser/types.ts:163