Skip to content

Commit

Permalink
fix(rulesets): length.min said "must not be longer than" (#2355)
Browse files Browse the repository at this point in the history
The not was a mistake, it should be "must be longer than".
  • Loading branch information
philsturgeon authored Dec 12, 2022
1 parent 810f591 commit df3b6f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/functions/src/__tests__/length.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Core Functions / Length', () => {
async input => {
expect(await runLength(input, { min: 4 })).toEqual([
{
message: 'The document must not be longer than 4',
message: 'The document must be longer than 4',
path: [],
},
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/functions/src/length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default createRulesetFunction<unknown[] | Record<string, unknown> | strin
if ('min' in opts && value < opts.min) {
results = [
{
message: `#{{print("property")}}must not be longer than ${printValue(opts.min)}`,
message: `#{{print("property")}}must be longer than ${printValue(opts.min)}`,
},
];
}
Expand Down

0 comments on commit df3b6f9

Please sign in to comment.