Validate without applying default values
I need to be able to tune if a want the joi default values to be applied or not when validating my data.
I was thinking about an option "ignoreDefaults": joi.validate(data, schema, { ignoreDefaults: true }).
I would like to know what do you think about it before pushing a PR.
Thanks.
What's the use case ?
My default values varies between different contexts. So when i am outside of this context, and i just want to validate my datas, there is no sense to apply default values.
Do you still need coercion ?
Yes, i would like to be able to use it with other options like stripUnknown.
OK why not, let's go for a noDefaults.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.