Skip to content

Fix: Add Client-Side Form Validation to Login and Signup PagesΒ #99

@Ananya-CM

Description

@Ananya-CM

πŸ› Bug Report

Area: Authentication β€” Login & Signup Forms
Type: Bug β€” Missing Client-Side Validation
Priority: Medium


πŸ“Œ Description

The Login and Signup pages in FlowForge currently
perform no client-side validation before submitting
the form. This means:

  • Users with empty fields or invalid email formats
    must wait for a server round-trip to see errors
  • No real-time feedback as user types
  • Poor UX β€” modern apps validate instantly

πŸ” Proof β€” No Validation in Source Code

In frontend/app/login/page.tsx, the only check is:

if (!email || !password) {
  showToast("Please enter your email and password.", "error");
  return;
}

No email format check, no password length check,
no real-time inline field validation anywhere.

In frontend/app/signup/page.tsx:

  • No email format validation on the client side
  • No real-time password strength indicator
  • No username format check before API call

❌ Current Behaviour

  • User submits form with invalid email β†’
    waits for server response β†’ sees error
  • No inline validation messages under fields
  • No real-time feedback while typing

βœ… Expected Behaviour

  • Email field shows "Invalid email format"
    instantly when user blurs the field
  • Password field shows "Min 8 characters"
    indicator in real-time
  • Login button disabled until basic
    validation passes
  • No unnecessary API calls for obviously
    invalid inputs

πŸ’‘ Proposed Fix

In frontend/app/login/page.tsx:

  1. Add email format regex check on blur
  2. Show inline error message under each field
  3. Disable login button if validation fails

In frontend/app/signup/page.tsx:

  1. Add real-time email format validation
  2. Add password strength indicator
  3. Add username format check (alphanumeric,
    3-20 chars) before API call

πŸ“‚ Files to Change

  • frontend/app/login/page.tsx
  • frontend/app/signup/page.tsx

@Shriii19
I'd like to work on this issue.
Could you please assign it to me?

nsoc26

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions