cleaned up errors

This commit is contained in:
Kai Ritthaler 2025-05-14 18:53:25 +02:00 committed by Rudi Regentonne
parent 01e703e538
commit dee6a19e51
3 changed files with 51 additions and 18 deletions

View file

@ -3,8 +3,8 @@ import { z } from "zod";
export const userRegistrationSchema = z.object({
username: z.string().regex(/^\S*$/, "Username must not contain spaces"), // No whitespaces allowed,
email: z.string().email(),
password: z.string().min(8),
email: z.string().email("Invalid email address"),
password: z.string().min(8, "Password must be at least 8 characters long"),
});
export const userLoginSchema = z.object({