tachito - pablokitz
TTCTheo's Typesafe Cult
•Created by tachito - pablokitz on 1/11/2024 in #questions
Passing config prop to zod schema for dynamic refinement
Please correct me if i am approaching this from the wrong perspective, im building a form with a calendar component, users should be able to select from and to dates, after submitting i want zod to validate if it is withing the range of minDays and maxDays. These two values would be provided by data fetched from a server, how would i pass it into my zod schema?
Many thanks!
3 replies