Files
supabase/apps/studio/components/interfaces/Auth
Ali Waseem 9da28685ec fix: remove SMS validation of fields for Twilio Verify (#44198)
## 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.
2026-03-25 17:49:27 -02:30
..