I use a form validation problem as a technical interview question. It's deceptively simple — and the solutions people reach for reveal a lot about how they think.

Then I tried it on Claude, ChatGPT, and Gemini. The results were illuminating, but not for the reasons I expected.

The Problem

Many form libraries share a common convention: form data is represented as a plain nested object, and the validation function returns an object of the same shape containing the errors. You'll find this pattern in Formik and React Final Form in React, and — full disclosure — in Inglorious Web, my own framework, which ships form handling built in without any extra dependencies.

const values = {