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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I would like to conditionally set fields as required/nonempty in my validation schema based on the presence or absence of other field(s), for example:
Is there a native way of doing that? what would be a good approach for this?
Similiar to what laravel does https://laravel.com/docs/10.x/validation#rule-required-if
I've tried to use
discriminatedUnionbut since the field that others depend on will not always be a literal type, it did not work.All reactions