In the previous article, I showed how I built a dynamic form renderer using JSON configuration in React + Formik.

Rendering the form fields turned out to be the easy part. The real challenge started when I needed validation.

In a traditional form, creating a Yup schema is straightforward because the fields are known in advance.

const validationSchema = yup.object({

firstName: yup.string().required('First Name is required'),