Skip to content

Support for payload validation #67

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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