-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inclusive should support default values #381
Comments
Sorry dumb question here... how is this different from:
|
If you put a set of values in an |
Ok so then how does the |
Yes, that is exactly the behaviour I'm looking for. A schema that uses |
Thank you for the explanation. I wasn't expecting the inclusive check to occur before default created the key with the default value if the key didn't exist. Updating the documentation to explain how the default value works on Inclusive would be helpful. |
The
Inclusive
schema builder does not support default values even though it inherits fromOptional
, which does support them. It would be valuable if defaults were supported for situations such as this:In general, when using
Inclusive
to enforce "all or nothing", having default values for the "nothing" case would be very helpful.The text was updated successfully, but these errors were encountered: