From 20e25dcc86272202419bb4af23bab2cf67fe445f Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 30 Oct 2024 14:28:01 +0300 Subject: [PATCH] Form stackblitz updates --- apps/showcase/doc/cascadeselect/FormsDoc.vue | 18 ++++++++----- apps/showcase/doc/inputnumber/FormsDoc.vue | 28 ++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/apps/showcase/doc/cascadeselect/FormsDoc.vue b/apps/showcase/doc/cascadeselect/FormsDoc.vue index d38cf208c..72e373504 100644 --- a/apps/showcase/doc/cascadeselect/FormsDoc.vue +++ b/apps/showcase/doc/cascadeselect/FormsDoc.vue @@ -141,9 +141,12 @@ export default { }, resolver: zodResolver( z.object({ - city: z.object({ - cname: z.string().min(1, 'City is required.') - }) + city: z.union([ + z.object({ + cname: z.string().min(1, 'City is required.') + }), + z.any().refine((val) => false, { message: 'City is required.' }) + ]) }) ), countries: [ @@ -259,9 +262,12 @@ const initialValues = ref({ const resolver = ref(zodResolver( z.object({ - city: z.object({ - cname: z.string().min(1, 'City is required.') - }) + city: z.union([ + z.object({ + cname: z.string().min(1, 'City is required.') + }), + z.any().refine((val) => false, { message: 'City is required.' }) + ]) }) )); diff --git a/apps/showcase/doc/inputnumber/FormsDoc.vue b/apps/showcase/doc/inputnumber/FormsDoc.vue index 7aebcdbaa..211d7b08c 100644 --- a/apps/showcase/doc/inputnumber/FormsDoc.vue +++ b/apps/showcase/doc/inputnumber/FormsDoc.vue @@ -5,8 +5,8 @@
- - {{ $form.number.error?.message }} + + {{ $form.amount.error?.message }}