From b2626114e196d7040f851fac4de14c3af0c84fae Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 21 Oct 2024 15:32:50 +0300 Subject: [PATCH 1/2] InputText validation demo added --- apps/showcase/doc/inputtext/FormDoc.vue | 98 +++++++++++++++++++++++++ apps/showcase/pages/inputtext/index.vue | 6 ++ 2 files changed, 104 insertions(+) create mode 100644 apps/showcase/doc/inputtext/FormDoc.vue diff --git a/apps/showcase/doc/inputtext/FormDoc.vue b/apps/showcase/doc/inputtext/FormDoc.vue new file mode 100644 index 000000000..dc1a422f6 --- /dev/null +++ b/apps/showcase/doc/inputtext/FormDoc.vue @@ -0,0 +1,98 @@ + + + diff --git a/apps/showcase/pages/inputtext/index.vue b/apps/showcase/pages/inputtext/index.vue index 1b97e20fc..128e88085 100755 --- a/apps/showcase/pages/inputtext/index.vue +++ b/apps/showcase/pages/inputtext/index.vue @@ -8,6 +8,7 @@ import BasicDoc from '@/doc/inputtext/BasicDoc.vue'; import DisabledDoc from '@/doc/inputtext/DisabledDoc.vue'; import FilledDoc from '@/doc/inputtext/FilledDoc.vue'; import FloatLabelDoc from '@/doc/inputtext/FloatLabelDoc.vue'; +import FormDoc from '@/doc/inputtext/FormDoc.vue'; import HelpTextDoc from '@/doc/inputtext/HelpTextDoc.vue'; import IftaLabelDoc from '@/doc/inputtext/IftaLabelDoc.vue'; import ImportDoc from '@/doc/inputtext/ImportDoc.vue'; @@ -30,6 +31,11 @@ export default { label: 'Basic', component: BasicDoc }, + { + id: 'form', + label: 'Form', + component: FormDoc + }, { id: 'filled', label: 'Filled', From 2f92dbfa9988fa5b7d35e0af260cd5efe6b18668 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 21 Oct 2024 15:37:41 +0300 Subject: [PATCH 2/2] Update FormDoc.vue --- apps/showcase/doc/inputtext/FormDoc.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/showcase/doc/inputtext/FormDoc.vue b/apps/showcase/doc/inputtext/FormDoc.vue index dc1a422f6..102bf10c8 100644 --- a/apps/showcase/doc/inputtext/FormDoc.vue +++ b/apps/showcase/doc/inputtext/FormDoc.vue @@ -86,9 +86,7 @@ const value = ref(null); this.resolver = zodResolver(this.schema); }, methods: { - onFormSubmit({ valid, values, states }) { - console.log(values, states); - + onFormSubmit({ valid }) { if (valid) { this.$toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 }); }