Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg 43bc8ca1d6 0.1.2 4 years ago
Sven Slootweg 71304bc3f4 Revert "Add callIfNull support"
This reverts commit 5dd62e2836.
4 years ago

@ -3,13 +3,9 @@
const combinator = require("@validatem/combinator");
module.exports = function withContext(rules, context) {
let validator = combinator((item, applyValidators, parentContext) => {
return combinator((item, applyValidators, parentContext) => {
let mergedContext = Object.assign({}, parentContext, context);
return applyValidators(item, rules, mergedContext);
});
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/with-context.git",
"author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save