HackerMasterEango / eangowen.moe

all things anime mobile gaming
1 stars 0 forks source link

Add Frontend Validation to Log in and handle errors appropriately #7

Open HackerMasterEango opened 2 days ago

HackerMasterEango commented 2 days ago

Need some final touchups on login, should finish everything here

  1. Add frontend validation
    • use zod for this: https://zod.dev/
    • require email
    • username over 3 chars, and no special characters like @
  2. require password to be typed twice on sign-up. Ensure it matches, if it does not, dynamically highlight Input with error variant.
  3. If user tries to sign up with an emial or username already taken, handle error appropriately (right now we just redirected to a 404).
  4. Handle any generic error gracefully, use shadCN Alert component, with destructive styling as placeholder - https://ui.shadcn.com/docs/components/alert . No need to manually style this yet.