Conditional validation schema
I have a problem while validation my form schema (schema.png). I have create and update dialog in the same component (dialog.png). I want to make validation based on dialog mode props (create | update). It makes successful api call (adds or updates the record). However, when i check if form parse is successful or not and it gives me this error(error.png).
I have started this project using create-tsrouter-app configs (tsrouter-config.png).
My question is how to pass dynamic zod validator schema to validators.
Thank you in advance



