Toloka documentation

List of conditions

    Use the components named conditions.* to match an expression against a condition. For example, you can check whether a text field is filled in.

    Component Description
    condition.all Checks that all child conditions are met. If any of the conditions is not met, the component returns 'false'.
    condition.any Checks that at least one of the child conditions is met. If none of the conditions is met, the component returns false.
    condition.empty Checks that the data didn't get a value. If it did, returns false. This is useful if you need to check the optional template data (data.*) or make sure that a Toloker didn't interact with the data entry fields (fields.*).
    condition.equals Checks whether the original value is equal to the specified value. Checks that a Toloker clicked the link.
    condition.not Returns the inverse of the specified condition.
    condition.played Checks whether playback has started.
    condition.played-fully Checks that playback is complete.
    condition.required Checks that the data is filled in.
    condition.same-domain Checks if the link that you entered belongs to a specific site. If it does, returns true, otherwise, false.
    condition.schema Allows validating data using JSON Schema. This is a special format for describing data in JSON format.
    condition.sub-array Checks whether the array is a subarray of another element.
    condition.distance This component checks whether the sent coordinates match the ones that you specified.