Skip to content

Commit

Permalink
refactor: change error message code
Browse files Browse the repository at this point in the history
  • Loading branch information
aaschlote committed Dec 23, 2024
1 parent 57b10dd commit 45e56ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/domains/fluggastrechte/formular/services/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ export function validateDepartureAfterArrival(
if (departureDateTime > arrivalDateTime) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "too_late",
message: "departureAfterArrival",
path: ["direktAnkunftsZeit"],
fatal: true,
});

// add new issue to invalidate this field as well
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "too_late",
message: "departureAfterArrival",
path: ["direktAnkunftsDatum"],
fatal: true,
});
Expand Down

0 comments on commit 45e56ae

Please sign in to comment.