mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Investigation by claude, validated! - Before (Formik): The old form used `<Form initialValues={INITIAL_VALUES} validationSchema={...}>` Formik does not unregister hidden fields — all fields from initialValues stay in form state with their initial values, so hidden required fields still pass validation because they retain their default values (e.g., the OTP expiry/length numbers from the config). - After (react-hook-form): The new form uses useForm({ shouldUnregister: true }). This explicitly removes fields from form state when their components unmount. When Twilio Verify is selected, the three hidden fields are unmounted, their values become undefined, and yup's unconditional .required() fails silently. this bug was introduced today by PR #44095, the Formik-to-react-hook-form migration.