Files
web/packages/booking-flow/lib/components/EnterDetails/Payment/schema.ts
Anton Gunnarsson 5a86cbaafe Merged in chore/update-eslint-configs (pull request #2812)
chore: Extend eslint configs from @typescript-eslint/recommended

* Change to typescript recommended in scandic-web

* Remove comment

* Change to recommended ts config in partner-sas

* Change to recommended ts lint config in booking-flow


Approved-by: Linus Flood
2025-09-17 07:55:11 +00:00

17 lines
402 B
TypeScript

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, paymentError.TERMS_REQUIRED),
guarantee: z.boolean(),
})
export type PaymentFormData = z.output<typeof paymentSchema>