From ff36111157b33455fa36580f3a381cef78de2537 Mon Sep 17 00:00:00 2001 From: Dany Date: Wed, 18 Mar 2026 15:27:46 +0100 Subject: [PATCH 1/4] types(Form): correct used interface --- src/runtime/types/form.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/types/form.ts b/src/runtime/types/form.ts index e86f3e1b45..4a2a45b533 100644 --- a/src/runtime/types/form.ts +++ b/src/runtime/types/form.ts @@ -6,9 +6,9 @@ import type { Struct as SuperstructSchema } from 'superstruct' export interface Form { validate(opts?: { name?: keyof FormData | (keyof FormData)[], silent?: boolean, nested?: boolean, transform?: T }): Promise | false> clear (path?: keyof FormData | string | RegExp): void - errors: Ref + errors: Ref setErrors (errs: FormError[], name?: keyof FormData | string | RegExp): void - getErrors (name?: keyof FormData | string | RegExp): FormError[] + getErrors (name?: keyof FormData | string | RegExp): FormErrorWithId[] submit (): Promise disabled: ComputedRef dirty: ComputedRef From cd1a78fc455587ba7e4a6ca8ac53ce673ba22f3c Mon Sep 17 00:00:00 2001 From: Dany Date: Wed, 18 Mar 2026 15:31:42 +0100 Subject: [PATCH 2/4] Update form.md --- docs/content/docs/2.components/form.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/2.components/form.md b/docs/content/docs/2.components/form.md index 84c96fb209..895c4182d3 100644 --- a/docs/content/docs/2.components/form.md +++ b/docs/content/docs/2.components/form.md @@ -234,9 +234,9 @@ This will give you access to the following: | `submit()`{lang="ts-type"} | `Promise`{lang="ts-type"}

Triggers form submission with HTML5 validation.

| | `validate(opts: { name?: keyof T \| (keyof T)[], silent?: boolean, nested?: boolean, transform?: boolean })`{lang="ts-type"} | `Promise`{lang="ts-type"}

Triggers form validation. Will raise any errors unless `opts.silent` is set to true.

| | `clear(path?: keyof T \| RegExp)`{lang="ts-type"} | `void`

Clears form errors associated with a specific path. If no path is provided, clears all form errors.

| -| `getErrors(path?: keyof T \| RegExp)`{lang="ts-type"} | `FormError[]`{lang="ts-type"}

Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.

| +| `getErrors(path?: keyof T \| RegExp)`{lang="ts-type"} | `FormErrorWithId[]`{lang="ts-type"}

Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.

| | `setErrors(errors: FormError[], name?: keyof T \| RegExp)`{lang="ts-type"} | `void`

Sets form errors for a given path. If no path is provided, overrides all errors.

| -| `errors`{lang="ts-type"} | `Ref`{lang="ts-type"}

A reference to the array containing validation errors. Use this to access or manipulate the error information.

| +| `errors`{lang="ts-type"} | `Ref`{lang="ts-type"}

A reference to the array containing validation errors. Use this to access or manipulate the error information.

| | `disabled`{lang="ts-type"} | `Ref`{lang="ts-type"} | | `dirty`{lang="ts-type"} | `Ref`{lang="ts-type"} `true` if at least one form field has been updated by the user. | | `dirtyFields`{lang="ts-type"} | `DeepReadonly>`{lang="ts-type"} Tracks fields that have been modified by the user. | From a5ae53e2b600e67c473c55b362fc33da90c04136 Mon Sep 17 00:00:00 2001 From: Dany Date: Wed, 18 Mar 2026 15:49:55 +0100 Subject: [PATCH 3/4] Update form.md --- docs/content/docs/2.components/form.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/docs/2.components/form.md b/docs/content/docs/2.components/form.md index 895c4182d3..3be6fd47eb 100644 --- a/docs/content/docs/2.components/form.md +++ b/docs/content/docs/2.components/form.md @@ -239,9 +239,9 @@ This will give you access to the following: | `errors`{lang="ts-type"} | `Ref`{lang="ts-type"}

A reference to the array containing validation errors. Use this to access or manipulate the error information.

| | `disabled`{lang="ts-type"} | `Ref`{lang="ts-type"} | | `dirty`{lang="ts-type"} | `Ref`{lang="ts-type"} `true` if at least one form field has been updated by the user. | -| `dirtyFields`{lang="ts-type"} | `DeepReadonly>`{lang="ts-type"} Tracks fields that have been modified by the user. | -| `touchedFields`{lang="ts-type"} | `DeepReadonly>`{lang="ts-type"} Tracks fields that the user interacted with. | -| `blurredFields`{lang="ts-type"} | `DeepReadonly>`{lang="ts-type"} Tracks fields blurred by the user. | +| `dirtyFields`{lang="ts-type"} | `ReadonlySet>`{lang="ts-type"} Tracks fields that have been modified by the user. | +| `touchedFields`{lang="ts-type"} | `ReadonlySet>`{lang="ts-type"} Tracks fields that the user interacted with. | +| `blurredFields`{lang="ts-type"} | `ReadonlySet>`{lang="ts-type"} Tracks fields blurred by the user. | ## Theme From d1bd40c703549f79f39d35dd79613e89dedc3a24 Mon Sep 17 00:00:00 2001 From: Dany Date: Thu, 23 Apr 2026 16:51:49 +0200 Subject: [PATCH 4/4] Update Form.vue --- src/runtime/components/Form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/components/Form.vue b/src/runtime/components/Form.vue index b6687784d9..aea743a40c 100644 --- a/src/runtime/components/Form.vue +++ b/src/runtime/components/Form.vue @@ -71,7 +71,7 @@ export interface FormEmits { } export interface FormSlots { - default?(props: { errors: FormError[], loading: boolean }): VNode[] + default?(props: { errors: FormErrorWithId[], loading: boolean }): VNode[] }