Command Palette

Search for a command to run...

position in category
#3

Schema description language and data validator for JavaScript. Lets you define validation rules using a chainable, declarative API and validate input at runtime with clear error messages and type coercion.

Originated in the Hapi ecosystem and widely adopted across the Node.js stack for API and config validation. Differentiates from alternatives like Yup and Zod with rich conditional logic, cross-field references, and a mature type system that covers strings, numbers, objects, arrays, dates, booleans, and alternatives.

Key features:

  • Schema types for strings, numbers, objects, arrays, dates, booleans, and alternatives
  • Conditional rules such as with, xor, and when for complex validation logic
  • Cross-field references and dependency validation via ref
  • Async validation with validateAsync and custom validators
  • Immutable schemas and optional type coercion

API and web servers validate request bodies, query params, and headers before handlers run. CLI tools and config loaders validate environment variables and JSON config. Form libraries and data pipelines use it to sanitize user input and enforce schema contracts before persistence.

GitHub Repositories
75
-11.8%
Trending down this week
Removed in 10 repos