Replies: 1 comment
-
This is a very interesting thing that you have found. I'm not sure if this is intended behavior or not. Feel free to submit a PR for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to know the reasoning behind the decision why
nullish
's chaining order isoptional().nullable()
?I think if the order is
nullable().optional()
then it would play nicely withrequired
Use case:
The latest code will not make
nullishProp
as required prop when we doschema.required({ nullishProp: true })
If we had
nullable().optional()
fornullish
then schema.required({ nullishProp: true }) makenullishProp
required and allownull
value as wellBeta Was this translation helpful? Give feedback.
All reactions