You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both should validate an empty object {} just fine given that the field is optional in both of them. Unfortunately, that's no the case. Adding .optional() call in the second schema actually makes the field required.
Describe the bug
Consider these two schemas:
Both should validate an empty object
{}
just fine given that thefield
is optional in both of them. Unfortunately, that's no the case. Adding.optional()
call in the second schema actually makes thefield
required.To Reproduce
https://codesandbox.io/s/cool-almeida-7ds47t
Expected behavior
Both schemas validate an empty object just fine.
Platform (please complete the following information):
master
)The text was updated successfully, but these errors were encountered: