{"_id":"express-joi","_rev":"30-e8825e004dad7c0a6ff7075ebe43be00","name":"express-joi","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","dist-tags":{"latest":"0.3.1"},"versions":{"0.0.1":{"name":"express-joi","version":"0.0.1","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"0.0.8"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"_id":"express-joi@0.0.1","dist":{"shasum":"9251312e97d5a77e933f19af8452dc93d0b24a7c","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.0.1.tgz","integrity":"sha512-LEhwDyMDc4pPpbx/h1S3K3njnaTzfWP/wENHyIgaDq930OGBMJvekcy3EykZiqUnPtXBuIPxyNxEbAsUAGNIAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCiSThmEu/4LqLz6dcV7CLK7AyOf1PhpzAVeMawg+p2wIgLxWSPzT0O7s80OY1dH/QXYdmQuWKX56KoBjn1y6E2FE="}]},"_from":"./","_npmVersion":"1.2.10","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}],"directories":{}},"0.0.2":{"name":"express-joi","version":"0.0.2","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"0.0.8"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.0.2","dist":{"shasum":"ed01b568d50e7bfc5a69c78f846a95f52f71e5c8","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.0.2.tgz","integrity":"sha512-McG+d6v3rlx+ew68pUiiGRuH+K1Ar1mU9kavbn5JzHZhLdQmV+uosdmInYqDJdUmh2x+huvVph09/U+8kh0qXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjhk/FOG/1OLf9ewQVDRcKDud7VJDEJOr+DOgmgq9O+wIhAJKIXsrw1nzenOlqYhC0AuGd3tfUMAbSUDd2J12kbvYB"}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}],"directories":{}},"0.0.3":{"name":"express-joi","version":"0.0.3","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"latest"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.0.3","dist":{"shasum":"d9fc43ad1421a8ec8f0c2a46ea3d8e3f671133fd","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.0.3.tgz","integrity":"sha512-3AcJeszYMJiLEHra/Z16YXRW8RxRAugMnQhSGZCjGXEvtj/eGmnrZOGK5DIyCUAQPcZ/aDywv6Paj2vo+kvErw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5oIkjcFfovgLLG1b+phO5UiNxKV0ALXu4XKdWwbwBnAiEAsFlAMWHubpgkovg4hDvy1UCrLDSWCZBREgQGsFYDD4c="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}],"directories":{}},"0.1.0":{"name":"express-joi","version":"0.1.0","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"latest"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.1.0","dist":{"shasum":"d8d909767dad9de062ad96fee739ff5640db320b","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.1.0.tgz","integrity":"sha512-h2EY2M2fYfalqSYkrWCNGZpn6kBaH3Gbwpnt49hiAQJ7XsnIG50yRIfeLfd+0aS0N+KL8BoOCCOmUVzMwfBXrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgRhjTt4kFOacsBmoAs86LJs3+b+ysO7yYXl5befjrlAiBAgspOUNqg/zLtOdzbCaE0zMgAsLqnv9hsx7yzuiqpHQ=="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.2.0":{"name":"express-joi","version":"0.2.0","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"latest"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.2.0","dist":{"shasum":"00ff8f13b46ac62e698534af6ac03ee7bab682c2","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.2.0.tgz","integrity":"sha512-CNiaFYJLsDb1Qcj/QORIg4N7MvuaUXnVYFR3k/BRAfv26ioB5u4gP5OlfEBJ/K/OtHqBC62mGRrNBTPxXqsEQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+2Fx4JfBiO8TWcEfmL0WSYnQt5iHUkClSpr7aego7RgIgLDtSKr/41aA2cZ646B+NIl+A9kS5GTmEVZkkzBCwMNw="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.2.1":{"name":"express-joi","version":"0.2.1","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"latest"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.2.1","dist":{"shasum":"df9fda8649ed87c6544596b40a5fc9f665aba24e","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.2.1.tgz","integrity":"sha512-rSro6NHwAh1xFK5xtY/jZnkXl7GRuNdEMLxVenBJjsTUzTxi0bDlLigiaqQKNDO9ssDSSctMhrpUDPyjSEtitw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4B4DOKvTYtdoNi2DTq2Rz6apARvzWCiiDZ7p1Q/52zwIgC1uHcuY2LDLpjlHqZeppTbK/65ldYR6B3v1r/3/zGkw="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.2.4":{"name":"express-joi","version":"0.2.4","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"latest"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.2.4","dist":{"shasum":"a120ac871a5ae660a7252dec70e738c830f54a2e","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.2.4.tgz","integrity":"sha512-Jlv6DCQ4q68nsPsdenU3cWdX4ZV776zm2bf6zlMyyYnzHrvRTve+aMwpdIxg+jhch4wqI+OV6SnxKPD4HuCffQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVCJtWt0X5FUE695NE6UluzmD4osSnlcfR9W4icgcF1AiEAhGDQuVeht9tXHbK4vmui6w7XkPF6SH8Vy0F1K3WG7wA="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.2.5":{"name":"express-joi","version":"0.2.5","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"1.2.0"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.2.5","dist":{"shasum":"dfd7a0fc4a9980768c3ed6ec14b6e9f351bf6dc5","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.2.5.tgz","integrity":"sha512-r99DuIMVyDFU/vNlvbTO/63I9nBXMx5ir+JxaIQrqRqXqGoClUJ/V0f/7NZGYzU5NOFkKwZge+7zY0xGY5CIfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGAL6leN3ex20LQnpajSm2beAgbVxQBjYibKDZHW/X6wIgFq3lBZaQ7o/eydrTEINWGJv6k3bJ5UzAvG0v3be64O8="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.2.6":{"name":"express-joi","version":"0.2.6","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"1.2.0"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"_id":"express-joi@0.2.6","dist":{"shasum":"5c404c33b9d1b54c5b5a2ae6ccc83c0bdb07aca6","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.2.6.tgz","integrity":"sha512-KQNGF79zwuhKkQfSJXNdFk5HprREUxcZs4ffHyDx3i20n65QtnWpMyQfiIgRB4641x/JOUNZWO+4deLvMoi+FQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXGuAxscPsfQ30xH6qZsK+L1foE3lhFH+r8Zf4D0o2iQIgVuhKD2h2kUL+7BLlj8cOyKo6E+OkscBmoI1e361jt3o="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.3.0":{"name":"express-joi","version":"0.3.0","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"2.9.0"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x","precommit-hook":"*"},"repository":{"type":"git","url":"https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"homepage":"https://github.com/petreboy14/express-joi","_id":"express-joi@0.3.0","dist":{"shasum":"fb9f5793175c7d21e5142d25705698aac2852bc0","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.3.0.tgz","integrity":"sha512-ls+MInuWU4eGWCANEgKZlqSVH3HBJkr8kOXyAO0iji9kjBigsovlfLyPoLjL2ez5u2/2sENt7LqG3ByFEzgocA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8XQ/Us1754nrHjUcHN/JeZQr+H4B3G8psj0SywXNxdwIhAKNoU1SMg2Uary+1+6LpmWQIqVAQNLfFTS3ML0ekzZoL"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]},"0.3.1":{"name":"express-joi","version":"0.3.1","description":"An A validation middleware for express using the Joi validation suite from Eran Hammer/Walmart Labs","contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"dependencies":{"joi":"2.9.0"},"devDependencies":{"express":"3.1.0","mocha":"1.8.1","should":"1.2.1","request":"2.x.x","precommit-hook":"*"},"repository":{"type":"git","url":"git+https://github.com/petreboy14/express-joi.git"},"keywords":["express","middleware","validation","joi"],"license":"MIT","engines":{"node":">=0.6"},"scripts":{"test":"mocha -R spec","lint":"jshint .","validate":"npm ls"},"pre-commit":["lint","validate","test"],"gitHead":"dc9a72dba78dbfe5c15c8af1217ee2c288c9026b","bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"homepage":"https://github.com/petreboy14/express-joi#readme","_id":"express-joi@0.3.1","_shasum":"5724a5209175dcc3319882101615efa7039c3fc9","_from":".","_npmVersion":"2.13.0","_nodeVersion":"2.4.0","_npmUser":{"name":"petreboy14","email":"petreboy14@gmail.com"},"dist":{"shasum":"5724a5209175dcc3319882101615efa7039c3fc9","tarball":"https://registry.npmjs.org/express-joi/-/express-joi-0.3.1.tgz","integrity":"sha512-+SxlsWW31G6jlPHBCpb1/4RWnjZOsVdDH6Vc8OGaSVvLGOsBcjTUmqA38OMd2hmbYodQBeCWdNxPYMsS2gQ8rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoEzG6ciq9vEvmDL16/RPpZmoiqjpU8b+hbrRXtCrbQAIgMAbGmPeIdoO7v0ruoiFIBEx5S62AgtG+wjA/yw3nW0U="}]},"maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}]}},"readme":"express-joi\n===========\n\n[![Build Status](https://travis-ci.org/petreboy14/express-joi.png)](https://travis-ci.org/petreboy14/express-joi)\n\n\nA validation middleware for express using the [Joi validation](https://github.com/spumko/joi) suite from Eran Hammer/Walmart Labs.\n\n## Installation\n```\nnpm install express-joi\n```    \n## Usage\n```javascript\nvar express = require('express');\nvar expressJoi = require('express-joi');\n\nvar Joi = expressJoi.Joi; // The exposed Joi object used to create schemas and custom types\n\nvar app = express();\napp.use(express.methodOverride());\napp.use(express.bodyParser());\napp.use(app.router);\napp.use(errorHandler);\n\n// Use the Joi object to create a few schemas for your routes. \nvar getUsersSchema = {\n  limit: expressJoi.Joi.types.Number().integer().min(1).max(25),\n  offset: expressJoi.Joi.types.Number().integer().min(0).max(25),\n  name: expressJoi.Joi.types.String().alphanum().min(2).max(25)\n};\n\nvar updateUserSchema = {\n  userId: Joi.types.String().alphanum().min(10).max(20),\n  name: Joi.types.String().min(3).max(50)\n};\n\n// Attach the validator to the route definitions\napp.get('/users', expressJoi.joiValidate(getUsersSchema), handleUsers);\napp.put('/users/:userId', expressJoi.joiValidate(updateUserSchema), handleUpdateUser);\n\napp.listen(8080);\n```\nIf a validation error occurs it will either be handled by your express error handling middleware or thrown.\n\n## Strict mode\n\njoiValidate takes a second optional object which will accept a strict key of true or false. When true, Joi will validate\nevery parameter in req.params, req.body, and req.query. If false, Joi will only validate parameters specified in the \ngiven validation object and pass any others directly through.\n\n```\napp.get('/users', expressJoi.joiValidate(schema, { strict: false }, ...);\n```\n\n## Consolidated Parameters\n\nUpon successful validation express-joi will add an items object to req with all parameters from req.body, req.params, and req.query.\n\n```\nfunction handleUsers(req, res) {\n    var limit = req.items.limit;\n    var offset = req.items.offset;\n    \n    // Do stuff...\n}\n```\n\n## Joi Information\n\nAll Joi built in types can be used with this middleware. Information on types and creating custom ones can be found at:\n\n[https://github.com/spumko/joi](https://github.com/spumko/joi)\n\n## Running Tests\n\nTo run the test suite first invoke the following command within the repo, installing the development dependencies:\n```\nnpm install\n```\n\nthen run the tests:\n```\nnpm test\n```\n","maintainers":[{"name":"petreboy14","email":"petreboy14@gmail.com"}],"time":{"modified":"2022-06-17T22:22:16.515Z","created":"2013-02-11T04:11:45.476Z","0.0.1":"2013-02-11T04:11:46.205Z","0.0.2":"2013-08-29T20:53:14.077Z","0.0.3":"2013-08-29T21:38:10.329Z","0.1.0":"2013-08-29T22:08:49.600Z","0.2.0":"2013-09-05T21:39:39.296Z","0.2.1":"2013-09-06T23:07:07.112Z","0.2.4":"2013-09-16T05:19:21.811Z","0.2.5":"2013-11-08T20:39:17.324Z","0.2.6":"2013-11-08T20:47:36.747Z","0.3.0":"2014-04-03T18:39:11.641Z","0.3.1":"2015-09-11T18:20:54.134Z"},"repository":{"type":"git","url":"git+https://github.com/petreboy14/express-joi.git"},"homepage":"https://github.com/petreboy14/express-joi#readme","keywords":["express","middleware","validation","joi"],"contributors":{"name":"Peter Henning","email":"petreboy14@gmail.com"},"bugs":{"url":"https://github.com/petreboy14/express-joi/issues"},"license":"MIT","readmeFilename":"README.md","users":{"errhunter":true,"vidhill":true}}