import { z } from "zod";
const booleanFromString = z.preprocess((val) => {
if (typeof val !== "string") return val;
return ["true", "1", "yes", "on"].includes(val.toLowerCase());
}, z.boolean());
import { z } from "zod";
const booleanFromString = z
.string()
.transform((v) => v.trim().toLowerCase())
.pipe(z.enum(["true", "false", "1", "0"]))