Package Exports
- koa-parameter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (koa-parameter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
koa-parameter
parameter validate middleware for koa, powered by parameter.
Installation
$ npm install koa-parameter --saveUsage
var koa = require('koa');
var parameter = require('koa-parameter');
parameter(app); // add verifyParams method, but don't add middleware to catch the error
// app.use(parameter(app)); // also add a middleware to catch the error.
app.use(function* () {
this.verifyParams({
name: 'string'
});
});Checkout parameter to get all the rules.
Example
License
MIT