Conditional validation according to API response. #4235
shankhadevpadam
started this conversation in
General
Replies: 1 comment
-
You could have |
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
-
I have a component with the phone field and this phone field will be displayed according to API response. If unique checkout data is true in the API response then this phone field should be displayed other wise it should be hidden. And if the phone field is displayed in the component it should be validated using yup.
Now the scenario is I fix this issue using the same duplicate component one has a phone field and another without a phone field.
and same for Yup schema also
and call the component like this
so I want to solve using a single file not using multiple files.
Beta Was this translation helpful? Give feedback.
All reactions