Skip to content
Snippets Groups Projects

When validating models, allow unknown keys which are ignored.

Closed Karissa McKelvey requested to merge validation-fix into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -26,7 +26,7 @@ class Model {
}
validate () {
let validation = Joi.validate(this, this.constructor.validations())
let validation = Joi.validate(this, this.constructor.validations(), {allowUnknown: true})
if (validation.error) {
logger.info(validation.error)