From e16379fdbdff6c98e96dc03cc67f3912f2f61075 Mon Sep 17 00:00:00 2001 From: Albert Date: Tue, 10 Oct 2023 11:47:22 -0400 Subject: [PATCH] feat(Form): handle `@error` event (#718) Co-authored-by: Albert Co-authored-by: Romain Hamel Co-authored-by: Benjamin Canac --- .../content/examples/FormExampleBasic.vue | 10 ++--- .../content/examples/FormExampleElements.vue | 11 ++--- .../content/examples/FormExampleJoi.vue | 10 ++--- .../content/examples/FormExampleOnError.vue | 42 ++++++++++++++++++ .../content/examples/FormExampleValibot.vue | 10 ++--- .../content/examples/FormExampleYup.vue | 10 ++--- .../content/examples/FormExampleZod.vue | 10 ++--- docs/content/1.getting-started/5.examples.md | 1 + docs/content/3.forms/10.form.md | 19 ++++++-- src/runtime/components/forms/Form.vue | 43 +++++++++++++++---- src/runtime/composables/useFormGroup.ts | 26 +++++++---- src/runtime/types/form.d.ts | 19 +++++--- 12 files changed, 142 insertions(+), 69 deletions(-) create mode 100644 docs/components/content/examples/FormExampleOnError.vue diff --git a/docs/components/content/examples/FormExampleBasic.vue b/docs/components/content/examples/FormExampleBasic.vue index b711cc6f35..25e5cbb3bf 100644 --- a/docs/components/content/examples/FormExampleBasic.vue +++ b/docs/components/content/examples/FormExampleBasic.vue @@ -1,5 +1,5 @@