New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koa-validator

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-validator - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

4

lib/validator.js

@@ -128,3 +128,5 @@ var validator = require('validator')

function updateBody(ctx, name, value){
return ctx.request.body[name] = value;
// If bodyparser middleware is not used, this will throw an error,
// so check `ctx.request.body` is whether exists
return ctx.request.body && (ctx.request.body[name] = value);
}

@@ -131,0 +133,0 @@

{
"name": "koa-validator",
"version": "0.6.1",
"version": "0.6.2",
"description": "a koa port of express-validator",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -60,3 +60,3 @@ ## koa-validator

### Note
If you will use `checkBody` or `assertBody`, you should use one bodyparse middleware before validator.
If you will use `checkBody` or `assertBody` or `sanitizeBody`, you should use one bodyparse middleware before validator.

@@ -63,0 +63,0 @@ ### Test

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