🐛 Fix schema validation for user creation

This commit is contained in:
Manuel
2023-07-31 22:36:43 +02:00
parent 061ae1ae6c
commit 961b8024ab
3 changed files with 22 additions and 23 deletions

View File

@@ -19,6 +19,12 @@ export const signUpFormSchema = z
path: ['passwordConfirmation'],
});
export const createNewUserSchema = z.object({
username: z.string(),
email: z.string().email().optional(),
password: z.string().min(8).max(100),
});
export const colorSchemeParser = z
.enum(['light', 'dark', 'environment'])
.default('environment')