Closed csantos1113 closed 11 months ago
I was trying to use yup.object().nonNullable() but can't pass the customized message.
For i18n purpose, allowing developers to pass custom message in nonNullable would be helpful.
Edit:
Turns out, I can pass customized message to yup.object().nonNullable() but it's just the types which are giving error in typescript.
I would like to confirm if all
.nonNullable()
methods should receive a message or not as I see some methods allowing that to be configured but not othersThis methods allow
msg
prop innonNullable
This methods do not allow
msg
prop innonNullable
To Reproduce
https://codesandbox.io/s/yup1-0-2-non-nullable-4dy2rc?file=/src/index.ts
Expected behavior
Not really sure what is the expected behavior. I'd have expected that all types can be combined with
nonNullable()
, and that if I use.nonNullable()
I can configure the message.Platform (please complete the following information):