Skip to content

Instantly share code, notes, and snippets.

View bryanjtc's full-sized avatar

Bryan Thomas bryanjtc

View GitHub Profile
@gesielrosa
gesielrosa / makeZodI18nMap.ts
Last active September 24, 2025 14:05
Zod → next-intl Error Map
import { TranslationValues, useTranslations } from 'next-intl';
import { ZodErrorMap, ZodIssueCode, ZodParsedType, defaultErrorMap } from 'zod';
const jsonStringifyReplacer = (_: string, value: any): any => {
if (typeof value === 'bigint') {
return value.toString();
}
return value;
};