Skip to content

Commit

Permalink
fix(chore): Fix error message when exceeding schema max items (twilio…
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and childish-sambino committed Oct 9, 2019
1 parent f94190d commit 46c472b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/api-schema/json-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class JSONSchemaValidator {
}

if (schema.maxItems && value.length > schema.maxItems) {
this.errors.push(`"${value}" item count (${value.length}) greater than max (${schema.minItems})`);
this.errors.push(`"${value}" item count (${value.length}) greater than max (${schema.maxItems})`);
}

if (schema.uniqueItems && new Set(value).size !== value.length) {
Expand Down

0 comments on commit 46c472b

Please sign in to comment.