# Forms diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each Forms error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 13 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Runtime errors

| Code | What happened |
| --- | --- |
| [`FORMS_R0001`](https://vitehub.dev/docs/forms/diagnostics/forms_r0001) | Forms could not \<action\>. |
| [`FORMS_R0002`](https://vitehub.dev/docs/forms/diagnostics/forms_r0002) | No form submission has the id \<id\>. |

## Configuration errors

| Code | What happened |
| --- | --- |
| [`FORMS_C0001`](https://vitehub.dev/docs/forms/diagnostics/forms_c0001) | defineForm(): \<message\> |

## Build errors

| Code | What happened |
| --- | --- |
| [`FORMS_B0001`](https://vitehub.dev/docs/forms/diagnostics/forms_b0001) | The form \<value\> needs a name of lowercase letters, digits, and dashes, such as contact or bug-report. |
| [`FORMS_B0002`](https://vitehub.dev/docs/forms/diagnostics/forms_b0002) | Forms keeps submissions in the Database, but the app has no Database, so a build would lose them. These forms store submissions: \<value\>. Turn on `database` in `vitehub()`, or set `store: false` with `notify` or `onSubmit` in each form. |

## Named errors

| Code | What happened |
| --- | --- |
| [`FORMS_AUTOFORM_SCHEMA_INVALID`](https://vitehub.dev/docs/forms/diagnostics/forms_autoform_schema_invalid) | AutoForm needs a Valibot object schema, such as v.object({ message: v.string() }). |
| [`FORMS_DATABASE_MISSING`](https://vitehub.dev/docs/forms/diagnostics/forms_database_missing) | Forms has no Database\<value\>. |
| [`FORMS_NOT_INSTALLED`](https://vitehub.dev/docs/forms/diagnostics/forms_not_installed) | The app has no forms. Add server/forms/\<name\>.ts with defineForm(). |
| [`FORMS_SUBMISSION_STATUS_INVALID`](https://vitehub.dev/docs/forms/diagnostics/forms_submission_status_invalid) | A form submission status is open, done, or spam, not \<status\>. |
| [`FORMS_SUBMIT_FAILED`](https://vitehub.dev/docs/forms/diagnostics/forms_submit_failed) | See the page of the code. |
| [`FORMS_SUBMIT_INVALID`](https://vitehub.dev/docs/forms/diagnostics/forms_submit_invalid) | See the page of the code. |
| [`FORMS_TABLES_MISSING`](https://vitehub.dev/docs/forms/diagnostics/forms_tables_missing) | Forms could not \<action\>: the Database has no `vitehub_form_submissions` table. |

## Errors

| Code | What happened |
| --- | --- |
| [`FORMS_FIELD_NOT_DRAWABLE`](https://vitehub.dev/docs/forms/diagnostics/forms_field_not_drawable) (guide) | \<value\> is \<found\>. \<surface\> takes \<takes\>. |

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/forms.md)
- [Get started](https://vitehub.dev/raw/docs/forms/get-started.md)
- [Server API](https://vitehub.dev/raw/docs/forms/server-api.md)
- [Limits and errors](https://vitehub.dev/raw/docs/forms/limits-and-errors.md)
- [Vue](https://vitehub.dev/raw/docs/forms/vue.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
