{"repo":"arb/celebrate","free":true,"listed":false,"github":"https://github.com/arb/celebrate","clone":"git clone https://github.com/arb/celebrate.git","description":"A joi validation middleware for Express.","language":"JavaScript","stars":1347,"topics":["express-middleware","joi","validation","express","express-validation"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"celebrate is an express middleware function that wraps the joi validation library. This allows you to use this middleware in any single route, or globally, and ensure that all of your inputs are correct before any handler function. The middleware allows you to validate req.params , req.headers , and req.query . The middleware will also validate: req.body — provided you are using body-parser req.cookies — provided you are using cookie-parser req.signedCookies — provided you are using cookie-parser celebrate lists joi as a formal dependency. This means that celebrate will always use a predictable, known version of joi during the validation and compilation steps. There are two reasons for this: 1. To ensure that celebrate can always use the latest version of joi as soon as it's published 2. So that celebrate can export the version of joi it uses to the consumer to maximize compatibility - express Compatibility - Example Usage - API - [ celebrate(schema, [joiOptions], [opts]) ](#celebrateschema-joioptions-opts) - [ celebrator([opts], [joiOptions], schema) ](#celebratoropts-joioptions-schema) - [ errors([opts]) ](#errorsopts) - Joi - Segments - Modes - [ new CelebrateError([message], [opts]) ](#new-celebrateerrormessage-opts) - isCelebrateError(err) - Additional Details - Validation Order - Mutation Warning - Additional Info - Issues express Compatibility celebrate is tested and has full compatibility with express 4 and 5. It likely works correctly with express 3, but including it","default_branch":null,"files":null,"tree":[],"storefront":"/r/arb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/arb/celebrate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}