refactor(validation): restucture api input and output validation

This commit is contained in:
Dominik 2025-06-18 21:36:30 +02:00 committed by Micha
parent 8207230886
commit b8ad6891e3
6 changed files with 14 additions and 359 deletions

View file

@ -18,7 +18,7 @@ function LoginFormElement({
formRef?: React.RefObject<HTMLFormElement | null>;
}) {
const { handleSubmit, formState, register, setError } =
useZodForm(loginClientSchema);
useZodForm(loginSchema);
const router = useRouter();
const onSubmit = handleSubmit(async (data) => {
@ -95,7 +95,7 @@ function RegisterFormElement({
formRef?: React.RefObject<HTMLFormElement | null>;
}) {
const { handleSubmit, formState, register, setError } =
useZodForm(registerClientSchema);
useZodForm(registerSchema);
const onSubmit = handleSubmit(async (data) => {
try {