Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

v3.0.0

Compare
Choose a tag to compare
@bodinsamuel bodinsamuel released this 01 Aug 11:14
· 290 commits to main since this release

Features

Updates

  • Object.schema({ schema, returnErrors }) signature is now Object.schema(schema, { returnErrors }) (old syntax is still accepted)

Breaking Changes

  • All tests (and .custom()) must return either a boolean or a valid object { isValid, error }.
    This allow returning custom error and argument to change the error message and be more strict about what is a succesful test.
    If your custom() call is returning something else (string, number ...) an error will be thrown.