Skip to content

v1.2.0

Choose a tag to compare

@ftonato ftonato released this 12 Jun 15:50
· 5 commits to master since this release
89364ec

Added

Shared (Primitive, Array)

  • default(value) / getDefault() β€” fallback values for undefined inputs
  • nullable() / nonNullable(message?) β€” control whether null is accepted
  • defined(message?) / optional() / notRequired() β€” control whether undefined is accepted
  • isValid(value) / isValidSync(value) β€” boolean validation helpers

String

  • uuid(message?) β€” UUID format validation (v1, v4, v5)
  • length(size, message?) β€” exact string length (alias for exactLength())

Array

  • length(size, message?) β€” exact array length validation

Object

  • pick(keys) / omit(keys) β€” schema reuse helpers
  • stripUnknown() β€” remove unknown keys during validation
  • getDefault() β€” collect defaults from child field schemas
  • isValid(value) / isValidSync(value) β€” boolean validation helpers