Skip to content

[Bug]: Missing Input Validation on Signup Form #99

@Harsh-vardhan09

Description

@Harsh-vardhan09

Area

Frontend UI

What happened?

Bug: Missing Email & Form Input Validation on Signup Form

Description

The signup form currently allows invalid input values to be submitted without proper validation.

Example issues observed:

  • Invalid email formats are accepted
  • Username accepts invalid characters/formats
  • Weak passwords are not properly validated
  • Date of birth fields may allow invalid or incomplete values
  • Submit button behavior is inconsistent when fields are invalid

This can lead to:

  • Invalid account creation attempts
  • Poor UX
  • Backend validation failures
  • Potential security/data quality issues

Screenshot

Image

Current Problems

Email Field

The form accepts malformed emails such as:

  • harsh@gmail
  • test@
  • abc
  • user@@gmail.com

Expected:

  • Only valid email formats should be accepted

Username Field

Potential issues:

  • Allows email-like usernames unintentionally
  • No validation for:
    • minimum length
    • special characters
    • spaces
    • reserved words

Expected:

  • Restrict invalid characters
  • Define clear username rules

Example valid usernames:

  • harsh
  • harsh_96
  • harsh-dev

Password Field

Current validation appears too weak.

Expected validations:

  • Minimum 8 characters
  • At least:
    • 1 uppercase letter
    • 1 lowercase letter
    • 1 number
    • 1 special character

Example invalid passwords:

  • 1234567
  • password
  • abcdef

Date of Birth Validation

DOB inputs should validate:

  • Valid day/month/year combinations
  • Age restrictions (if required)
  • Empty/incomplete values

Examples:

  • Prevent future dates
  • Prevent invalid dates like 31 February

Expected Behavior

  • Form should validate all fields before submission
  • Inline validation errors should appear below inputs
  • Submit button should remain disabled until form is valid
  • Invalid inputs should show clear error messages
  • Validation should happen:
    • on blur
    • on submit
    • optionally during typing

Suggested Validation Rules

Email Regex

/^[^\s@]+@[^\s@]+\.[^\s@]+$/




### Steps to reproduce

1. signup page
2. false email like harsh.gamil.com
3. ask for otp

### Expected behavior

user should only be able to input right email using regex and form validation on frontend

### Actual behavior

can input false or wrong input by mistake

### App surface

Registration / OTP verification

### Local environment

_No response_

### Console, network, or server logs

```shell

Screenshots or recordings

No response

Before submitting

  • I checked for an existing issue that already describes this bug.
  • I included enough detail for someone else to reproduce the issue.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions