Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jdfed/drip-form-plugin-eggjs

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jdfed/drip-form-plugin-eggjs

drip-form eggjs插件

  • 0.2.0-alpha.0
  • alpha
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

drip-form-plugin-eggjs

drip-form plugin for eggjs.

Install

$ npm i @jdfed/drip-form-plugin-eggjs --save

Usage

// {app_root}/config/plugin.js
exports.dripValidator = {
  enable: true,
  package: '@jdfed/drip-form-plugin-eggjs',
};

Example

// app/controller/home.js
const Controller = require('egg').Controller;
class HomeController extends Controller {
  async index() {
    const rules = {
      type: 'object',
      properties: {
        name: {
          type: 'string',
        },
        age: {
          type: 'integer',
        },
      },
      required: [
        'name',
        'age',
      ],
    };
    this.ctx.validateBySchema(rules);
    this.ctx.body = 'ok!';
  }
}
module.exports = HomeController;

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 15 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc