Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.0 #254

Closed
hueniverse opened this issue Apr 16, 2014 · 0 comments
Closed

4.0.0 #254

hueniverse opened this issue Apr 16, 2014 · 0 comments
Assignees
Labels
breaking changes Change that can breaking existing code
Milestone

Comments

@hueniverse
Copy link
Contributor

Removed:

  • validateCallback() - use validate() on compiled schema
  • any().rename() - use object().rename()
  • rename() move option - use alias set to true
  • modify option - the input value is no longer modified, just the return value
  • with(), without(), xor(),or()from all types exceptobject`
  • error.simple() - error.message is set to simple string automatically and doesn't change.
  • error.annotated()

Changed:

  • validation no longer changes the input value, and returns the modified value via the validate callback.
  • validate() requires a new callback argument
  • schema.validate() no longer supports options - use Joi.validate() to override the default options.
  • rename() deletes old key by default
  • with(), without() now require the name of the key they apply to and all other peers must be provided in a single array.
  • or() and xor() are no longer bound to a specific key but to all the listed peers together.
  • various error messages.
  • error.annotate() returns the verbose message without changing the error itself.
  • alternatives using the [] notation now allow undefined by default (defaulted to required before).
  • complete rewrite of the errors language template and context
@hueniverse hueniverse added this to the 4.0.0 milestone Apr 16, 2014
@hueniverse hueniverse self-assigned this Apr 16, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code
Projects
None yet
Development

No branches or pull requests

1 participant