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

Method maxLength

packages/zod/src/v3/types.ts:1319–1327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1317 }
1318
1319 get maxLength() {
1320 let max: number | null = null;
1321 for (const ch of this._def.checks) {
1322 if (ch.kind === "max") {
1323 if (max === null || ch.value < max) max = ch.value;
1324 }
1325 }
1326 return max;
1327 }
1328
1329 static create = (params?: RawCreateParams & { coerce?: true }): ZodString => {
1330 return new ZodString({

Callers 5

example-mini.tsFile · 0.80
convertBaseSchemaFunction · 0.80
maxFunction · 0.80
codec.test.tsFile · 0.80
checks.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected