We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
anymaniax
melloware
soartec-lab
Learn more about funding links in repositories.
Report abuse
1 parent 993d227 commit 0296a82Copy full SHA for 0296a82
packages/zod/src/index.ts
@@ -62,9 +62,17 @@ const generateZodValidationSchemaDefinition = (
62
const required = schema.default !== undefined ? false : _required ?? false;
63
const nullable = schema.nullable ?? false;
64
const min =
65
- schema.minimum ?? schema.exclusiveMinimum ?? schema.minLength ?? undefined;
+ schema.minimum ??
66
+ schema.exclusiveMinimum ??
67
+ schema.minLength ??
68
+ schema.minItems ??
69
+ undefined;
70
const max =
- schema.maximum ?? schema.exclusiveMaximum ?? schema.maxLength ?? undefined;
71
+ schema.maximum ??
72
+ schema.exclusiveMaximum ??
73
+ schema.maxLength ??
74
+ schema.maxItems ??
75
76
const matches = schema.pattern ?? undefined;
77
78
switch (type) {
0 commit comments