---
url: https://formhaus.dev/migrate/0.20.md
description: >-
  Upgrade from Formhaus 0.19 to 0.20: definition format 1.4, the contains and
  notContains condition operators and their new warnings.
---

# Migrate to 0.20

0.20 reads definition format 1.4, which adds the `contains` and `notContains` condition operators for `multiselect` answers. Core 0.19 and older reject a definition that uses them. Upgrade the server that runs `validateSubmission()` before the clients.

```bash
npm i @formhaus/core@^0.20 @formhaus/react@^0.20
npm i @formhaus/core@^0.20 @formhaus/vue@^0.20
```

## Changes

| Area | Old (0.19) | New (0.20) | Action |
|---|---|---|---|
| Format | `FORMAT_VERSION` was `"1.3"` | `"1.4"` | Set `"formatVersion": "1.4"` on definitions with `contains` or `notContains` |
| Conditions | A condition on a `multiselect` could only test `notEmpty`: `eq` and `in` never match an array | `{ "field": "interests", "contains": "other" }` matches when the answer includes `other`, and `notContains` when it does not | Replace workarounds, such as a separate checkbox, with `contains` |
| Checks | `contains` was an `unknown-operator` error | `contains` on a field that does not hold a list is a `contains-not-list` warning, and a value that is not an option a `contains-not-in-options` warning | None |

Native ports that run the conformance suite in `packages/core/fixtures/conformance` must implement both operators. The new files are `scenarios/contains.json`, `contains-disabled.json`, `check-contains-not-list.json`, `check-contains-options.json` and `check-outdated-version-contains.json`.
