Skip to content

Commit

Permalink
resolve max properties error message on records
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Jul 18, 2023
1 parent b19575f commit af8ccc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>(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)
Expand Down

0 comments on commit af8ccc4

Please sign in to comment.