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
17 lines
402 B
TypeScript
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>
|