Added reset password function + basic mail layout

This commit is contained in:
2024-10-27 21:30:33 +01:00
parent 8f8f019ab7
commit 5a36d10f0e
7 changed files with 86 additions and 2 deletions

View File

@ -33,6 +33,14 @@ export const registerAccountSchema = z.object({
.max(255)
})
export const resetPasswordSchema = z.object({
email: z
.string()
.min(3, { message: 'Email must be at least 3 characters long' })
.max(255, { message: 'Email must be at most 255 characters long' })
.regex(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/, { message: 'Email must be valid' })
})
export const ZCharacterCreate = z.object({
name: z
.string()