Get the required fields of a complex schema (variants and unions) #484
Unanswered
ruiaraujo012
asked this question in
Q&A
Replies: 1 comment 12 replies
-
Object entries are required by default. I recommend to detect if a field is optional and then remove the (*). |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm building a React form with some complex validations, like if
foo
is true,bar
is required, otherwise is optional.To do that, I need to use unions and variants, and here is the problem, how can extract all the fields that are required, so I can mark the form field as required (*)? Any help please?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions