diff --git a/docs/content/2.components/form.md b/docs/content/2.components/form.md index bbda52ab..7b80a7b5 100644 --- a/docs/content/2.components/form.md +++ b/docs/content/2.components/form.md @@ -30,10 +30,10 @@ When accessing the component via a template ref, you can use the following: | Name | Type | | ---- | ---- | -| `submit()` | `Promise`
[Triggers form submission.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `validate(path?: string \| string[], opts: { silent?: boolean })` | `Promise`
[Triggers form validation. Will raise any errors unless `opts.silent` is set to true.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `clear(path?: string)` | `void`
[Clears form errors associated with a specific path. If no path is provided, clears all form errors.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `getErrors(path?: string)` | `FormError[]`
[Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `setErrors(errors: FormError[], path?: string)` | `void`
[Sets form errors for a given path. If no path is provided, overrides all errors.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `errors` | `Ref`
[A reference to the array containing validation errors. Use this to access or manipulate the error information.]{class="text-gray-600 dark:text-gray-300 mt-1"} | -| `disabled` | `Ref` | +| `submit()`{lang="ts-type"} | `Promise`{lang="ts-type"}

Triggers form submission.

| +| `validate(path?: string \| string[], opts: { silent?: boolean })`{lang="ts-type"} | `Promise`{lang="ts-type"}

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

| +| `clear(path?: string)`{lang="ts-type"} | `void`

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

| +| `getErrors(path?: string)`{lang="ts-type"} | `FormError[]`{lang="ts-type"}

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

| +| `setErrors(errors: FormError[], path?: string)`{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.

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