We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cb6697 + 88c6bbc commit d4b426bCopy full SHA for d4b426b
.changeset/common-breads-wait.md
@@ -0,0 +1,5 @@
1
+---
2
+'@qwik.dev/router': patch
3
4
+
5
+FIX: Zod validator uses defined locale for the current request
packages/qwik-router/src/runtime/src/server-functions.ts
@@ -6,6 +6,7 @@ import {
6
noSerialize,
7
untrack,
8
useStore,
9
+ withLocale,
10
type QRL,
11
type ValueOrPromise,
12
} from '@qwik.dev/core';
@@ -367,7 +368,7 @@ export const zodQrl: ZodConstructorQRL = (
367
368
}
369
});
370
const data = inputData ?? (await ev.parseBody());
- const result = await schema.safeParseAsync(data);
371
+ const result = await withLocale(ev.locale(), () => schema.safeParseAsync(data));
372
if (result.success) {
373
return result;
374
} else {
0 commit comments