Replies: 1 comment
-
Can you post your code? How are you doing your validation? If you are using Zod, you can build a schema that will only require the laptop or cloud sections of the form using a union or discriminated union. |
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
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 have fields that include both local and cloud file selections, as shown in the image below (Shadcn UI):
The
<CloudFilesSelector />
component is not displayed when the tab is set to 'From Your Laptop', and vice versa. When I submit the form from the 'Local' tab with some files selected, I receive a validation error stating 'please select cloud files.' How can I skip the hiddencloudFiles
field?Additionally,
formState.isValid
is incorrect, making it difficult to properly disable the submit button.Beta Was this translation helpful? Give feedback.
All reactions