---
title: "X18N4008: Invalid edit input"
description: "Invalid edit input. Check the input shape against the docs."
canonical_url: "https://x18n.dev/errors/x18n4008"
---
# X18N4008: Invalid edit input

> Invalid edit input. Check the input shape against the docs.

<!-- Generated by docs/scripts/generate.ts from the source code. Do not edit. -->

## Message

```
[X18N4008] Invalid edit input <detail>
├▶ fix: Check the input shape against the docs.
╰▶ see: https://x18n.dev/errors/x18n4008
```

The CLI prints the code and why the error happened, with details such as a file name or a field. The fix and a link to this page follow. With `--json`, the same parts are in `errors` of the [envelope](https://x18n.dev/references/json-contracts).

## What to do

The input of an edit has the wrong shape.

- `x18n set` needs `--value <text>` (or `--value -` to read stdin).
- `x18n apply` needs JSON in the shape `{ "<locale>": { "<key>": "<value>" } }`. Values are strings, numbers, booleans or `null`.
- `x18n extract --apply` needs a plan file written by `x18n extract --plan`.
- `x18n review` needs `--locale <locale>` to comment, approve, request a change or suggest; `request-change` needs `--text` and `suggest` needs `--value`.

## Exit code

The CLI exits with code `1`.

## Source

- [`packages/builtins/src/extractors/index.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/builtins/src/extractors/index.ts)
- [`packages/builtins/src/formats/resx/index.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/builtins/src/formats/resx/index.ts)
- [`packages/cli/src/commands/change.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/cli/src/commands/change.ts)
- [`packages/cli/src/commands/check.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/cli/src/commands/check.ts)
- [`packages/cli/src/commands/extract.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/cli/src/commands/extract.ts)
- [`packages/cli/src/commands/review.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/cli/src/commands/review.ts)
- [`packages/core/src/project/approvals.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/approvals.ts)
- [`packages/core/src/project/batch.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/batch.ts)
- [`packages/core/src/project/planner.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/planner.ts)
- [`packages/core/src/project/translate.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/translate.ts)


## Sitemap

See the full [sitemap](https://x18n.dev/sitemap.md) for all pages.
