diff --git a/src/errors/errors.ts b/src/errors/errors.ts index aa5fe28be..92663dcc8 100644 --- a/src/errors/errors.ts +++ b/src/errors/errors.ts @@ -342,7 +342,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 requiredKeys = globalThis.Array.isArray(schema.required) ? schema.required : ([] as string[]) const knownKeys = globalThis.Object.getOwnPropertyNames(schema.properties)