You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/3.components/form.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,19 +197,19 @@ const form = useTemplateRef('form')
197
197
198
198
This will give you access to the following:
199
199
200
-
| Name | Type |
201
-
|----|----|
202
-
|`submit()`{lang="ts-type"} |`Promise<void>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>Triggers form submission.</p> |
203
-
|`validate(opts: { name?: keyof T \| (keyof T)[], silent?: boolean, nested?: boolean, transform?: boolean })`{lang="ts-type"} |`Promise<T>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>Triggers form validation. Will raise any errors unless `opts.silent` is set to true.</p> |
204
-
| `clear(path?: keyof T | RegExp)`{lang="ts-type"} |`void` <br> <divclass="text-toned mt-1"><p>Clears form errors associated with a specific path. If no path is provided, clears all form errors.</p> |
205
-
| `getErrors(path?: keyof T |RegExp)`{lang="ts-type"} |`FormError[]`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.</p></div> |
206
-
| `setErrors(errors: FormError[], name?: keyof T |RegExp)`{lang="ts-type"} |`void` <br> <divclass="text-toned mt-1"><p>Sets form errors for a given path. If no path is provided, overrides all errors.</p> |
207
-
|`errors`{lang="ts-type"} |`Ref<FormError[]>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>A reference to the array containing validation errors. Use this to access or manipulate the error information.</p> |
|`submit()`{lang="ts-type"} |`Promise<void>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>Triggers form submission.</p>|
203
+
|`validate(opts: { name?: keyof T \| (keyof T)[], silent?: boolean, nested?: boolean, transform?: boolean })`{lang="ts-type"} |`Promise<T>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>Triggers form validation. Will raise any errors unless `opts.silent` is set to true.</p> |
204
+
|`clear(path?: keyof T \| RegExp)`{lang="ts-type"} |`void` <br> <divclass="text-toned mt-1"><p>Clears form errors associated with a specific path. If no path is provided, clears all form errors.</p>|
205
+
|`getErrors(path?: keyof T RegExp)`{lang="ts-type"} |`FormError[]`{lang="ts-type <br> <divclass="text-toned mt-1"><p>Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.</p></div>|
206
+
|`setErrors(errors: FormError[], name?: keyof T RegExp)`{lang="ts-type"} |`void` <br> <divclass="text-toned mt-1"><p>Sets form errors for a given path. If no path is provided, overrides all errors.</p>|
207
+
|`errors`{lang="ts-type"} |`Ref<FormError[]>`{lang="ts-type"} <br> <divclass="text-toned mt-1"><p>A reference to the array containing validation errors. Use this to access or manipulate the error information.</p> |
0 commit comments