From df3b6f917cf46456f698445ed67fabbb4306eb4c Mon Sep 17 00:00:00 2001 From: Phil Sturgeon <67381+philsturgeon@users.noreply.github.com> Date: Mon, 12 Dec 2022 13:18:33 +0000 Subject: [PATCH] fix(rulesets): length.min said "must not be longer than" (#2355) The not was a mistake, it should be "must be longer than". --- packages/functions/src/__tests__/length.test.ts | 2 +- packages/functions/src/length.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/functions/src/__tests__/length.test.ts b/packages/functions/src/__tests__/length.test.ts index 173a5c1ee..9e3fff231 100644 --- a/packages/functions/src/__tests__/length.test.ts +++ b/packages/functions/src/__tests__/length.test.ts @@ -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: [], }, ]); diff --git a/packages/functions/src/length.ts b/packages/functions/src/length.ts index 054758349..0e576ab79 100644 --- a/packages/functions/src/length.ts +++ b/packages/functions/src/length.ts @@ -40,7 +40,7 @@ export default createRulesetFunction | 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)}`, }, ]; }