ReactHookForm + ZOD: Validating against stateful values

Hi, I'm currently trying to build a currency conversion app as a personal project,


I have an input form that allows a user to pick their desired currency to send/receive, when this choice happens I query an API which returns a MIN/MAX value to transact.

How do I make another currency amount input use these as rules?

I can use the native html rules like:

<input min={minValueState} max={maxValueState}>

But these do not provide errors in the same way that the ZOD resolver does.
Was this page helpful?