We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mongoosejs
Learn more about funding links in repositories.
Report abuse
1 parent cfc3194 commit a55fba7Copy full SHA for a55fba7
lib/schema/number.js
@@ -92,7 +92,7 @@ SchemaNumber.prototype.min = function(value, message) {
92
msg = msg.replace(/{MIN}/, value);
93
this.validators.push({
94
validator: this.minValidator = function(v) {
95
- return v === null || v >= value;
+ return v == null || v >= value;
96
},
97
message: msg,
98
type: 'min',
@@ -146,7 +146,7 @@ SchemaNumber.prototype.max = function(value, message) {
146
msg = msg.replace(/{MAX}/, value);
147
148
validator: this.maxValidator = function(v) {
149
- return v === null || v <= value;
+ return v == null || v <= value;
150
151
152
type: 'max',
0 commit comments