Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 2.75 KB

CHANGELOG.md

File metadata and controls

57 lines (34 loc) · 2.75 KB

Changelog

4.0.0

  • Use async/await syntax (semver-major): #159
  • Fix #153: #159

3.1.0

  • Handle mutation by completely replacing the request property with validated/coerced value from Joi: #154

3.0.3

  • adding better typescript support: #106

Changes from versions 2.0

  • Global options for allowUnknown* removed
  • Joi no longer parsing response to JSON, so we dont

Changes before 3.0

2.0.0:

  • Updated to joi version 15, which broke all the things: #101

1.0.2:

  • Lifted Joi peerDependencies, now it's * so to offload responsability to end-users. #58

1.0.0:

  • Removed flatten documentation as the functionality was broken since 0.5.0 and nobody opened an issue about it (nor there were tests for that option).
  • Added contextRequest option from #25, thanks to @amazzeo
  • A bit of documentation revamp, feedback is welcome

0.6.0: Joi dependency moved to peerDependencies, it has to be installed at the same depth as express-validation. This is to avoid having to bump library version to update Joi.

0.5.0: req objects gets parsed. Joi validates the body, params, query, headers or cookies and returns a Javascript Object.

0.4.5: support for Joi.ref inside arrays, refer to #17 for an example

0.4.4: support for Joi any.default, thanks to @iheanyi

0.4.3: added cookies validation, thanks to @aymericbeaumet.

0.4.2: errors have now a types array (full reference in Joi source), similar to messages, useful to sum up errors for internationalization purposes.

0.4.1: added options() method to globally override configuration.

0.4.0: express-validation now returns a ValidationError, not a simple Error. This offer some advantages when writing error handlers.

0.3.0: prior to version 0.3.0, we returned a json error response straight out of the middleware, this changed in 0.3.0 to allow the express application itself to return the error response. So from 0.3.0 onwards, you will need to add an express error handler, and return an error response.