From 45e56aec80af0f40d0e7e0f80a74672080d2ba81 Mon Sep 17 00:00:00 2001 From: aaschlote Date: Mon, 23 Dec 2024 18:25:16 +0100 Subject: [PATCH] refactor: change error message code --- app/domains/fluggastrechte/formular/services/validation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/domains/fluggastrechte/formular/services/validation.ts b/app/domains/fluggastrechte/formular/services/validation.ts index 5fcc81ee8..1c3b1d50e 100644 --- a/app/domains/fluggastrechte/formular/services/validation.ts +++ b/app/domains/fluggastrechte/formular/services/validation.ts @@ -25,7 +25,7 @@ export function validateDepartureAfterArrival( if (departureDateTime > arrivalDateTime) { ctx.addIssue({ code: z.ZodIssueCode.custom, - message: "too_late", + message: "departureAfterArrival", path: ["direktAnkunftsZeit"], fatal: true, }); @@ -33,7 +33,7 @@ export function validateDepartureAfterArrival( // add new issue to invalidate this field as well ctx.addIssue({ code: z.ZodIssueCode.custom, - message: "too_late", + message: "departureAfterArrival", path: ["direktAnkunftsDatum"], fatal: true, });