minValue
Minimums can be used
@zod
model User {
id: string;
@minValue(18) age: int32;
}
zod.ts
import * as z from "zod";
export const User = z.shape({
id: z.string(),
age: z.number().gte(18),
});
export type User = z.infer<typeof User>;
Minimums can be used
@zod
model User {
id: string;
@minValue(18) age: int32;
}
import * as z from "zod";
export const User = z.shape({
id: z.string(),
age: z.number().gte(18),
});
export type User = z.infer<typeof User>;