Inquisit Language Reference
The isvalidresponse attribute specifies custom logic used to classify a response as valid or invalid.
<likert> <openended> <trial>
|expression||An expression that returns boolean true or false. See help with expression syntax for more information.|
After a response is made on a given trial, this parameter specifies an expression to be evaluated that determines whether the response should be scored as valid or invalid. If the expression returns a logical value of true (any non-null or nonzero value), the response is considered valid. If the expression returns boolean false (zero or null), the response is considered invalid.
This command can be used instead of or in conjunction with validresponse to define dynamic or conditional rules for judging response accuracy.
The following classifies the response as valid if the latency is greater than a minimum response time, and the scancode of the key press is 1 or 2:
/ isvalidresponse=[trial.mytrial.latency > values.mintime && (trial.mytrial.response == 2 || trial.mytrial.response == 3)]
The following classifies the response as valid if it has exactly 5 characters:
/ isvalidresponse=[length(openended.id.response) == 5]
The following classifies the response as valid based on a predefined expression: