Skip to content

Commit 28aa62f

Browse files
fix: minItems error message (#43)
1 parent 0512f32 commit 28aa62f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ValidationError.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class ValidationError extends Error {
644644
}
645645

646646
return `${dataPath} should not have fewer than ${
647-
error.limit
647+
error.params.limit
648648
} items.${this.getSchemaPartDescription(error.parentSchema)}`;
649649
}
650650
case 'minProperties': {

test/__snapshots__/index.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ exports[`Validation should fail validation for min properties 1`] = `
851851
852852
exports[`Validation should fail validation for minItems Keyword 1`] = `
853853
"Invalid configuration object. Object has been initialised using a configuration object that does not match the API schema.
854-
- configuration.minItemsKeyword should not have fewer than undefined items."
854+
- configuration.minItemsKeyword should not have fewer than 2 items."
855855
`;
856856
857857
exports[`Validation should fail validation for minProperties 1`] = `

0 commit comments

Comments
 (0)