
About Joi
Joi is a JavaScript library for describing the shape of data and checking that incoming values match it. You define a schema once and use it to validate objects in your application.
What it does
A Joi schema is built from chainable rules that read close to plain English. The library includes more than 150 built-in validators for strings, numbers, dates, arrays, objects and binary data. Rules can depend on other fields, so you can require one field when another is present, or allow only one of two fields. Schemas can be altered and tailored for different contexts, such as create and update requests, without duplicating code. You can also add custom rules and types through the extension system and share them as plugins.
Key features
- Check data with more than 150 built-in validators
- Set rules that depend on other fields
- Create schema variants for create and update flows
- Extend the library with custom rules and types
- Validate with one call that returns a value and error
Who it's for
JavaScript developers who check request bodies, form input or configuration files will find it useful. Backend teams that need the same rules in several places can keep them in one shared schema.
Pricing and good to know
Joi is open source and is installed with npm. It runs in JavaScript environments and is free to use. Validation is only one part of input safety, so pair it with sanitising and authorisation checks where they matter.
Highlights
- Check data with more than 150 built-in validators
- Set rules that depend on other fields
- Create schema variants for create and update flows
- Extend the library with custom rules and types
- Validate with one call that returns a value and error












