Skip to content

Commit 39224d3

Browse files
committed
Fix #84: Correct validation error message for the maximum keyword
1 parent 640c572 commit 39224d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dataValidation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export default function DataValidator(schema) {
334334
this.addError(coords, 'This value must not be less than ' + schema.minimum);
335335

336336
if ((schema.maximum || schema.maximum === 0) && data > schema.maximum)
337-
this.addError(coords, 'This value must not be greater than ' + schema.minimum);
337+
this.addError(coords, 'This value must not be greater than ' + schema.maximum);
338338

339339
if ((schema.exclusiveMinimum || schema.exclusiveMinimum === 0) && data <= schema.exclusiveMinimum)
340340
this.addError(coords, 'This value must be greater than ' + schema.exclusiveMinimum);

0 commit comments

Comments
 (0)