Skip to content

Login form has zero validation #13

Description

@anoopcodehack

File: client/src/pages/Login.jsx

Problems:

  • Empty email/password submits the form
  • No password minimum length check
  • Email format not validated

Fix: before calling handleSubmit, check:
if (!form.email.includes("@")) → show error
if (form.password.length < 6) → show error
if (isRegister && !form.name.trim()) → show error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions