fixed error messages

This commit is contained in:
Kai Ritthaler 2025-05-16 08:26:06 +02:00 committed by Rudi Regentonne
parent 4fa920fd83
commit 4951554c54
2 changed files with 16 additions and 24 deletions

View file

@ -9,7 +9,7 @@ export const userRegistrationSchema = z.object({
export const userLoginSchema = z.object({
username: z.string().regex(/^\S*$/, "Username must not contain spaces"), // No whitespaces allowed,
password: z.string(),
password: z.string().min(1, "Password is required"),
});
// DTO-Typen aus den Schemas ableiten
export type UserRegistrationDto = z.infer<typeof userRegistrationSchema>;