-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing code
Milestone
Description
Removed:
validateCallback()- usevalidate()on compiled schemaany().rename()- useobject().rename()rename()moveoption - usealiasset totruemodifyoption - the input value is no longer modified, just the return valuewith(),without(),xor(),or()from all types exceptobject`error.simple()-error.messageis 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 newcallbackargumentschema.validate()no longer supports options - useJoi.validate()to override the default options.rename()deletes old key by defaultwith(),without()now require the name of the key they apply to and all other peers must be provided in a single array.or()andxor()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 allowundefinedby default (defaulted to required before). - complete rewrite of the errors language template and context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing code