Merged in fix/BOOK-127-translate-validation-text (pull request #2800)

fix(BOOK-127): translate terms required message

* fix(BOOK-127): translate terms required message


Approved-by: Erik Tiekstra
This commit is contained in:
Bianca Widstam
2025-09-15 10:43:57 +00:00
parent b437f8b806
commit 295e98a560
2 changed files with 19 additions and 4 deletions

View File

@@ -1,11 +1,15 @@
import { z } from "zod"
export enum paymentError {
TERMS_REQUIRED = "TERMS_REQUIRED",
}
export const paymentSchema = z.object({
paymentMethod: z.string().nullish(),
smsConfirmation: z.boolean(),
termsAndConditions: z.boolean().refine((value) => value === true, {
message: "You must accept the terms and conditions",
}),
termsAndConditions: z
.boolean()
.refine((value) => value === true, paymentError.TERMS_REQUIRED),
guarantee: z.boolean(),
})