Skip to content

Object with 'or', keys contains an array with a 'null' element #567

@gagle

Description

@gagle
joi.object().keys({
  a: joi.string(),
  b: joi.string()
}).or('a', 'b')

This is what I get if 'a' and 'b' doen't exist:

"validation": {
  "source":"payload",
  "keys": ["null"]
}

Should keys be an empty array? I'm using the master branch.

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions