Core
Guides v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

The validators property #

The validators property is an array of Koncorde filters. Each filter has to match in order for the document to be valid.

Structure #

Copied to clipboard!
{
  "myIndex": {
    "myCollection": {
      "strict": true,
      "fields": {
        "..."
      },
      "validators": [
        { "equals": { "fieldName": "maximilian"} },
        {
          "bool": {
            "must": [
              "..."
            ],
            "must_not": [
              "..."
            ],
            "should": [
              "..."
            ],
            "should_not": [
              "..."
            ]
          }
        },
        "..."
      ]
    },
    "..."
  },
  "..."
}

Translates to the following Koncorde query:

Copied to clipboard!
{
  "bool": {
    "must": [
      { "equals": { "fieldName": "maximilian" } },
      {
        "bool": {
          "must": ["..."],
          "must_not": ["..."],
          "should": ["..."],
          "should_not": ["..."]
        }
      },
      "..."
    ]
  }
}