Skip to content

Commit

Permalink
fix: correct typo in error message for @ArrayMaxSize decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
NoNameProvided committed Nov 20, 2022
1 parent abe6a4b commit 3aee314
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 @@ -4446,7 +4446,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 3aee314

Please sign in to comment.