Skip to content

Commit

Permalink
fix: fix JOI validate format
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Oct 24, 2019
1 parent a519a67 commit 24af2d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/base-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,8 @@ const _internals = {

// If validation for value is configured run validation, optionally throwing on failed validation
if (fieldConfig.validation) {
const { error, value } = Joi.validate(
const { error, value } = fieldConfig.validation.schema.validate(
result.value,
fieldConfig.validation.schema,
{
convert: true
}
Expand Down

0 comments on commit 24af2d4

Please sign in to comment.