WIP: form attachments docs (forms, email, security, storage, deployment, notifications), honeypot value sent
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
701bb420c1
commit
344574d6bd
@@ -57,6 +57,22 @@ if (!result.success) {
|
||||
This replaces a hardcoded `Error: ${result.reason}` — now a friendly text from the panel,
|
||||
per language.
|
||||
|
||||
## File field texts
|
||||
|
||||
With `forms.attachments` ([forms.md](./forms.md) "Files") the **Files** group of Form messages holds:
|
||||
|
||||
| Key | Placeholders | English default |
|
||||
|---|---|---|
|
||||
| `fileTooLarge` | `{file}`, `{max}` (MB) | `"{file}" is too large. The limit is {max} MB.` |
|
||||
| `fileType` | `{file}`, `{types}` | `"{file}" is not an accepted file type. Accepted: {types}.` |
|
||||
| `fileCount` | `{field}`, `{max}` | `Attach at most {max} files in "{field}".` |
|
||||
| `fileNotSent` | — | `We could not send your file. Try again, or send it by e-mail.` |
|
||||
| `fileRemove` | `{file}` | `Remove {file}` |
|
||||
|
||||
Polish defaults ship too; any other language is filled in the panel. `resolveFormMessage` maps
|
||||
`kind: 'file_too_large' | 'file_type' | 'file_count'` and `reason: 'delivery'` to them; a texts object without these
|
||||
keys falls back to `validation` / `error`.
|
||||
|
||||
## {field} interpolation
|
||||
|
||||
The `validation` text may contain `{field}` — it is replaced with the **technical name** of the field with
|
||||
|
||||
Reference in New Issue
Block a user