From a47d9cc0068cd8e34fa7f6e8b13955f04fcc1ede Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 23 Jan 2024 11:50:09 +0100 Subject: [PATCH] docs(form): improve `API` section --- docs/content/3.forms/10.form.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/content/3.forms/10.form.md b/docs/content/3.forms/10.form.md index f5c53520..121bd9f6 100644 --- a/docs/content/3.forms/10.form.md +++ b/docs/content/3.forms/10.form.md @@ -202,6 +202,8 @@ componentProps: ## API +When accessing the component via a template ref, you can use the following: + ::field-group ::field{name="submit ()" type="Promise"} Triggers form submission. @@ -209,16 +211,16 @@ componentProps: ::field{name="validate (path?: string, opts: { silent?: boolean })" type="Promise"} Triggers form validation. Will raise any errors unless `opts.silent` is set to true. :: - ::field{name="clear (path?: string)" type="void"} + ::field{name="clear (path?: string)"} Clears form errors associated with a specific path. If no path is provided, clears all form errors. :: ::field{name="getErrors (path?: string)" type="FormError[]"} Retrieves form errors associated with a specific path. If no path is provided, returns all form errors. :: - ::field{name="setErrors (errors: FormError[], path?: string)" type="void"} + ::field{name="setErrors (errors: FormError[], path?: string)"} Sets form errors for a given path. If no path is provided, overrides all errors. :: ::field{name="errors" type="Ref"} A reference to the array containing validation errors. Use this to access or manipulate the error information. - :: + :: ::