chriso/node-validator — Issue #62: unexpected behavior isNull and notNull
Author: mren
Created: 2012-02-24 17:37:36+00:00
State: open

`isNull` and `notNull` are implemented in this way

notNull: function(str) {
return str !== '';
},
isNull: function(str) {
return str === '';
},

which checks if the string is empty and not if the object is null.
Wouldn't be

isNull: function(str) {
return str === null;
},
notNull: function(str) {
return !validators.isNull(str);
}

be more consistent with the validation name?