From af8ccc4af07ffb2e22e157e497111222ede7186c Mon Sep 17 00:00:00 2001 From: sinclair Date: Wed, 19 Jul 2023 02:12:42 +0900 Subject: [PATCH] resolve max properties error message on records --- src/errors/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)