Skip to content

Upgrade Joi to v6

Choose a tag to compare

@clarkie clarkie released this 30 Jun 19:39
· 140 commits to master since this release

When using default(fn) in a schema a second argument needs to be passed:

PublishedDateTime: Joi.date().default(Date.now, 'now')

Error message formats have changed.

See here for the breaking changes inside Joi itself: hapijs/joi#579