egg-validate
Validate plugin for egg.
see parameter for more information such as custom rule.
Install
$ npm i egg-validate --save
Usage
// {app_root}/config/plugin.jsexportsvalidate = package: 'egg-validate';
Validate Request Body
// {app_root}/app/controller/home.jsexports { this; // will throw if invalid // or const errors = thisvalidator;};
Extend Rules
- app.js
appvalidator;
Questions & Suggestions
Please open an issue here.