-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We need the possibility to validate the incoming payload.
Popular valdiation librarys:
https://github.com/rjrodger/parambulator
https://github.com/hapijs/joi
We could use the same approach as in seneca.
//parambulator
.define(
{
a: 1,
b: {required$: true}
},
function (msg, done) {
done(null, {c: msg.b})
})
//Joi
.define(
{
a: 1,
b: Joi.required()
},
function (msg, done) {
done(null, {c: msg.b})
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels