Skip to content

Support for payload validation #67

@StarpTech

Description

@StarpTech

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})
      })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions