MCPcopy
hub / github.com/colinhacks/zod / setCommonNumberChecks

Function setCommonNumberChecks

packages/zod/src/v4/classic/tests/apply.test.ts:40–42  ·  view source on GitHub ↗
(schema: T)

Source from the content-addressed store, hash-verified

38
39test("basic apply (number)", () => {
40 const setCommonNumberChecks = <T extends z.ZodNumber>(schema: T) => {
41 return schema.min(0).max(100);
42 };
43
44 const schema = z.number().apply(setCommonNumberChecks).nullable();
45

Callers

nothing calls this directly

Calls 2

maxMethod · 0.65
minMethod · 0.65

Tested by

no test coverage detected