Skip to content

Commit

Permalink
Update superforms import and use zodClient for validators
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspresume committed Mar 5, 2024
1 parent ff040f9 commit 3325155
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/components/form/FeedbackForm.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script lang="ts">
import { page } from '$app/stores';
import { superForm } from 'sveltekit-superforms/client';
import { superForm } from 'sveltekit-superforms';
import { zodClient } from 'sveltekit-superforms/adapters';
import { toast } from 'svelte-sonner';
Expand All @@ -16,9 +17,7 @@
const { enhance, form, errors, message, delayed } = superForm($page.data['feedbackForm'], {
id: 'feedbackForm',
resetForm: true,
taintedMessage: null,
validators: FeedbackValidationSchema,
validators: zodClient(FeedbackValidationSchema),
onUpdated: () => {
if (!$message) return;
Expand Down

0 comments on commit 3325155

Please sign in to comment.