Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg f6e92a461c 0.1.2 4 years ago
Sven Slootweg b1a5951b47 Revert "Add callIfNull support"
This reverts commit cb16313b03.
4 years ago

@ -20,7 +20,7 @@ function concat(arrays) {
module.exports = function wrapError(message, rules, options = {}) {
let preserveOriginalErrors = defaultValue(options.preserveOriginalErrors, false);
let validator = combinator((value, applyValidators, context) => {
return combinator((value, applyValidators, context) => {
let result = applyValidators(value, rules, context);
if (result.errors.length > 0) {
@ -76,8 +76,4 @@ module.exports = function wrapError(message, rules, options = {}) {
return result;
}
});
validator.callIfNull = true;
return validator;
};

@ -6,7 +6,7 @@
"validator",
"combinator"
],
"version": "0.1.1",
"version": "0.1.2",
"main": "index.js",
"repository": "http://git.cryto.net/validatem/wrap-error.git",
"author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save