Skip to content

Commit

Permalink
Merge pull request #1353 from nicksrandall/patch-1
Browse files Browse the repository at this point in the history
Add user-friendly message for maxLength validation
  • Loading branch information
epoberezkin committed Dec 16, 2020
2 parents cd7c6a8 + b68927a commit dc55ff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vocabularies/validation/limitLength.ts
Expand Up @@ -6,7 +6,7 @@ import ucs2length from "../../compile/ucs2length"
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
const comp = keyword === "maxLength" ? "more" : "fewer"
return str`should NOT have ${comp} than ${schemaCode} items`
return str`should NOT have ${comp} than ${schemaCode} characters`
},
params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
}
Expand Down

0 comments on commit dc55ff2

Please sign in to comment.