codedaily.io
How to Create an Optional Dynamic Validation Schema based on a Value with the Yup Validation Library
2
In this lesson we'll show how to setup a nested validation structure using the `yup` library. We'll then use the `yup.lazy` method to evaluate the `value` at runtime and adjust our validation schema. We'll make our nested validation optional only if our `... Read full article