refactor: upgrade to Zod v4 (#623)

This commit is contained in:
Elias Schneider
2025-06-08 15:44:59 +02:00
committed by GitHub
parent 9a4aab465a
commit 388a874922
18 changed files with 270 additions and 51 deletions

View File

@@ -5,7 +5,7 @@
import type { ApiKeyCreate } from '$lib/types/api-key.type';
import { preventDefault } from '$lib/utils/event-util';
import { createForm } from '$lib/utils/form-util';
import { z } from 'zod';
import { z } from 'zod/v4';
let {
callback
@@ -28,8 +28,8 @@
const formSchema = z.object({
name: z
.string()
.min(3, m.name_must_be_at_least_3_characters())
.max(50, m.name_cannot_exceed_50_characters()),
.min(3)
.max(50),
description: z.string().default(''),
expiresAt: z.date().min(new Date(), m.expiration_date_must_be_in_the_future())
});