joi-browser is a browser-ready bundle of the Joi object schema validation library (version 13.4.0, latest stable). It is pre-babelified and bundled for use in browsers with tools like Webpack or Browserify, avoiding the difficulties of bundling Joi natively. The package provides an ES5-compatible bundle and supports isomorphic/universal JavaScript by aliasing Joi in module bundlers. It requires polyfills for Promise and Map in older browsers and has an alternate 'joi-full' variant that includes date extensions. Community-driven alternative to native Joi, last updated in 2019.
npm install joi-browserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic schema validation using Joi's object schema, including .keys(), .string(), .number(), and validation with error checking.
For latest Joi features, consider using the official 'joi' package with a polyfill or browser build.
Replace schema.validate(value) with Joi.validate(value, schema) or schema.validateAsync(value).
Include polyfills such as 'es6-promise' and 'es6-map' before loading joi-browser.
In webpack config, add exclude: /joi-browser/ to the Babel loader rule.
Use the default bundle for bundling; consider building your own minified version with your toolchain.
Run 'npm install joi-browser' and ensure import statement uses 'joi-browser', not 'joi'.
Use Joi.validate() correctly: Joi.validate(value, schema). For Joi v16+, use schema.validateAsync(value).
Add a Promise polyfill (e.g., 'es6-promise') before loading joi-browser.
Configure alias in webpack (resolve.alias) or browserify (package.json browser field) as documented.
No dependency data recorded yet.