Set Required Conditionally #1768
-
I'm just looking to conditionally require input based on the input in other fields. As you can see below, I'm using
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
codesansdbox? or consider using |
Beta Was this translation helpful? Give feedback.
-
Hey @bluebill1049, this has been working beautifully until I tried incorporating non-value date to the validate function e.g., state. Even though the state has been updated, it seems to ignore it entirely when validation is triggered (onSubmit). Is there some way to get validate to reflect the state (as it is) when the user hits submit? In my case, I only want to require a "file label" input when a file has been uploaded in another input.
|
Beta Was this translation helpful? Give feedback.
codesansdbox? or consider using
validate
function