diff --git a/src/errors/errors.ts b/src/errors/errors.ts index 92663dcc8..c94f7f037 100644 --- a/src/errors/errors.ts +++ b/src/errors/errors.ts @@ -391,7 +391,7 @@ export namespace ValueErrors { yield { type: ValueErrorType.ObjectMinProperties, schema, path, value, message: `Expected object to have at least ${schema.minProperties} properties` } } if (IsDefined(schema.maxProperties) && !(globalThis.Object.getOwnPropertyNames(value).length <= schema.maxProperties)) { - yield { type: ValueErrorType.ObjectMaxProperties, schema, path, value, message: `Expected object to have less than ${schema.minProperties} properties` } + yield { type: ValueErrorType.ObjectMaxProperties, schema, path, value, message: `Expected object to have less than ${schema.maxProperties} properties` } } const [patternKey, patternSchema] = globalThis.Object.entries(schema.patternProperties)[0] const regex = new RegExp(patternKey)