feat: improve ZodIssue rendering in config validation

This commit is contained in:
Dragory 2024-01-15 22:36:10 +00:00
parent ac8926cdb8
commit cbec80981d
No known key found for this signature in database
2 changed files with 13 additions and 3 deletions

View file

@ -0,0 +1,6 @@
import { ZodIssue } from "zod";
export function formatZodIssue(issue: ZodIssue): string {
const path = issue.path.join("/");
return `${path}: ${issue.message}`;
}