Feat: Confirm setup password (#1722)

confirm setup password
This commit is contained in:
Bernd Storath
2025-03-07 16:05:40 +01:00
committed by GitHub
parent 0597470f4c
commit 5b68cc7311
4 changed files with 27 additions and 9 deletions

View File

@@ -26,10 +26,15 @@ export const UserLoginSchema = z.object({
remember: remember,
});
export const UserSetupSchema = z.object({
username: username,
password: password,
});
export const UserSetupSchema = z
.object({
username: username,
password: password,
confirmPassword: password,
})
.refine((val) => val.password === val.confirmPassword, {
message: t('zod.user.passwordMatch'),
});
const name = z
.string({ message: t('zod.user.name') })