Skip to content

Commit

Permalink
fix: Correct grammar of error message - arrayMaxSize
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeca362 committed Aug 11, 2021
1 parent f4ec310 commit 91f7d35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decorator/array/ArrayMaxSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ArrayMaxSize(max: number, validationOptions?: ValidationOptions)
validator: {
validate: (value, args): boolean => arrayMaxSize(value, args.constraints[0]),
defaultMessage: buildMessage(
eachPrefix => eachPrefix + '$property must contain not more than $constraint1 elements',
eachPrefix => eachPrefix + '$property must contain no more than $constraint1 elements',
validationOptions
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4355,7 +4355,7 @@ describe('ArrayMaxSize', () => {

it('should return error object with proper data', () => {
const validationType = 'arrayMaxSize';
const message = 'someProperty must contain not more than ' + constraintToString(constraint) + ' elements';
const message = 'someProperty must contain no more than ' + constraintToString(constraint) + ' elements';
return checkReturnedError(new MyClass(), invalidValues, validationType, message);
});
});
Expand Down

0 comments on commit 91f7d35

Please sign in to comment.