Skip to content

Latest commit

 

History

History
125 lines (74 loc) · 6.64 KB

CHANGELOG.md

File metadata and controls

125 lines (74 loc) · 6.64 KB

5.0.15 (2022-08-08)

Bug Fixes

5.0.14 (2022-07-26)

Bug Fixes

5.0.13 (2022-01-17)

Bug Fixes

5.0.12 (2021-09-02)

Bug Fixes

Changelog

5.0.2 (2020-01-31)

Features

  • Object.anyOf() Force one or many keys to be present

5.0.0 (2019-08-01)

New online documentation: https://bodinsamuel.github.io/altheia/

Breaking

  • Rewrite in Typescript
  • NodeJs support: 8 >=
  • Syntax ES6+
  • Now use yarn
  • Object().schema() old syntax no longer accepted. Please use schema(schema, { returnErrors = true })
  • All tests should now return { valid: boolean; error: string } | boolean
  • alt.option() unknown is now true by default
  • Types .validate(<value>) now return { type, valid, result? }
    • name has been renamed type
    • isValid has been renamed valid Please refer to typescript definition to see full object

Features

  • alt.validate() can now take a body directly alt.validate({ my: 'body' }); old syntax alt.body({ my: 'body' }).validate() still work.

4.0.0 (2018-11-20)

Breaking

  • Alt(...).validate() can not be called twice, you need to clone() documentation

3.3.0 (2018-11-19)

Features

  • Object.schema(): now returnErrors=true by default

3.2.0 (2018-11-19)

Features

  • Object.in(): signature change (retro-compatible) with new option oneErrorPerKey documentation

3.1.1 (2018-11-06)

  • Update dependencies

3.1.0 (2018-10-03)

Features

Updates

  • Update dependencies
  • Add comments everywhere and enforce jsdoc with eslint
  • All tests can now return an array of errors { isValid, error, errors }. This allow returning nested error.

3.0.0 (2018-08-01)

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.

2.1.0 (2018-06-15)

Features