site icon indicating copy to clipboard operation
site copied to clipboard

Joi validation from example does not work correctly

Open Valeronlol opened this issue 6 years ago • 0 comments

The problem occurs when you try to set a default value. For example: Joi.object().keys({ foo: Joi.number().valid([0, 1]).default(0) }) Nothing will return. I already found another way to do this it and created PR to fix docs, just make sure I'm move in the right direction :) https://github.com/moleculerjs/site/pull/75

Valeronlol avatar Sep 05 '19 20:09 Valeronlol