Skip to content

✨ Features

  • ✅ Validate a single value with a function, RegExp, or None
  • ✅ Validate multiple entries at once
  • ✅ Build schema-based validation models with CustomClassicModel
  • TypeScript types bundled — no separate @types package
  • ✅ Generic validate<T> / nestvalidate<T> — result type inferred from input
  • ✅ Type-narrowing guards (asserts value is T) on every public method
  • "Expected X, got Y" error descriptions on every guard failure
  • ✅ Forge and reuse schemas across different payload shapes (partial-payload matching)
  • ✅ Zero dependencies
  • ✅ Built-in validators for username, email, phone, password, and required
  • ✅ URL validation with opt-in constraint rules
  • ✅ Input normalisation via Normalizer
  • None sentinel — explicitly skip validation for any field
  • ✅ Recursive nested-schema validation — error tree mirrors your data's shape
  • __File() — validate File objects atomically inside nestvalidate
  • ✅ Runtime schema mutation via extend() / remove() / swap()