condition.schema

Allows validating data using JSON Schema. This is a special format for describing data in JSON format.

For example, you can describe the data type, the minimum and maximum values, and specify that all values must be unique.

This component is useful in the following cases:

  • If available components don't provide everything you need to configure validation.
  • If you already have a prepared JSON Schema configuration for the check and you want to use it.
View example
Components used in the example

Component properties

NameTypeDescription
type*"condition.schema"Set component type.
dataanyData that should be checked.
hintstringValidation error message that a Toloker will see.
schemaJSON Schema draft 7The schema for validating data.
schema.maxLengthintegerMaximum number of symbols.
schema.minLengthintegerMinimum number of symbols.
schema.patternstringA pattern in the form of a regular expression.
schema.typestring

One of the data types:

  • string
  • integer
  • object
  • array
  • boolean
  • null
Contact support

Last updated: March 29, 2023

Introduction
Getting started
Important tips
Useful recommendations
Working with Toloka
Projects
Pools
Tasks
Results
Project analysis
Toloka settings
Task interface
Template Builder
HTML/CSS/JS editor
Help and support
FAQTroubleshootingSupportGlossary