From a1c116de7bcd5ce6b8ae7019668ce9860c0620ce Mon Sep 17 00:00:00 2001 From: muri Date: Tue, 18 Jun 2024 09:02:51 -0300 Subject: [PATCH] docs(form): improve validation references (#1877) --- docs/content/2.components/form.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/2.components/form.md b/docs/content/2.components/form.md index 203704d2..dccb236b 100644 --- a/docs/content/2.components/form.md +++ b/docs/content/2.components/form.md @@ -8,13 +8,13 @@ links: ## Usage -Use the Form component to validate form data using schema libraries such as [Yup](https://github.com/jquense/yup), [Zod](https://github.com/colinhacks/zod), [Joi](https://github.com/hapijs/joi), [Valibot](https://valibot.dev/), or your own validation logic. +Use the Form component to validate form data using schema libraries such as [Yup](https://github.com/jquense/yup), [Zod](https://github.com/colinhacks/zod), [Joi](https://github.com/hapijs/joi), [Valibot](https://github.com/fabian-hiller/valibot), or your own validation logic. It works with the [FormGroup](/components/form-group) component to display error messages around form elements automatically. The form component requires two props: - `state` - a reactive object holding the form's state. -- `schema` - a schema object from [Yup](#yup), [Zod](#zod), [Joi](#joi), or [Valibot](#valibot). +- `schema` - a schema object from a validation library like [Yup](https://github.com/jquense/yup), [Zod](https://github.com/colinhacks/zod), [Joi](https://github.com/hapijs/joi) or [Valibot](https://github.com/fabian-hiller/valibot). ::callout{icon="i-heroicons-light-bulb"} Note that **no validation library is included** by default, so ensure you **install the one you need**. @@ -63,7 +63,7 @@ The validation function must return a list of errors with the following attribut - `path` - Path to the form element corresponding to the `name` attribute. ::callout{icon="i-heroicons-light-bulb"} -Note that it can be used alongside the `schema` prop to handle complex use cases. +Note that it can be used alongside the `schema` prop to handle complex use cases. :: ::component-example