2.0.2 • Published 4 years ago

@kobionic/koa-joi-validator v2.0.2

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
4 years ago

Koa Joi Validator

npm version License Code style Build status

A Koa middleware to validate given part of a request against a Joi schema.

Installation

npm install @kobionic/koa-joi-validator

Usage

import joiValidator from '@kobionic/koa-joi-validator';
import Koa from 'koa';

const app = new Koa();
app.use(
  joiValidator({
    body: Joi.object().keys({
      email: Joi.string().email().required(),
      password: Joi.string().min(8).max(128).required(),
    }),
  }),
);
app.listen();

Run Tests

npm test

Authors

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

2.0.2

4 years ago

2.0.1

4 years ago

1.0.10

4 years ago

2.0.0

4 years ago

1.0.9

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago