express validator
simple request validation middleware for express.
install
npm i oolon-express-validator
usage
Validates a request agains a given json schema
The root of the schema must be an object with at least one of the properties: param
, query
or body
const express = const http = const validate = const schema = id : "all" type: "object" properties: query: type: "object" required : "prop1" "prop2" properties: prop1: "type": "string" prop2: "type": "string" const app = appall'*' resapphttp