I am using older version of npm module joi => 10.2.2 and i am trying to figure out how can i build the schema so empty, null, undefined values are allowed with a default value.
This works https://github.com/hapijs/joi/issues/516
var schema = joi.object().keys({a:[joi.string().optional(), joi.allow(null)]})
but i don't know how to specify a default value with this.
What i am looking for is this https://github.com/hapijs/joi/issues/1066 (version v10.5.2) but with the syntax of older version of joi.