Summary
The “Send login code” button can be clicked with an empty or invalid email. Disable it until the email field contains @.
What should change?
- In src/app/login/page.tsx, derive emailValid from input
- Disable submit button when email is empty or missing @
- Optional: subtle helper text (“Enter a valid email”)
Acceptance criteria
Button disabled for empty/invalid email
Button enables when email contains @
No API call on disabled submit
Checklist of done conditions:
How to test
- Open /login
- Confirm button disabled initially
- Type test → still disabled
- Type test@example.com → enabled
- Submit works
Summary
The “Send login code” button can be clicked with an empty or invalid email. Disable it until the email field contains @.
What should change?
Acceptance criteria
Button disabled for empty/invalid email
Button enables when email contains @
No API call on disabled submit
Checklist of done conditions:
How to test