Skip to content

[Bug]: TournamentHub allows invalid dates and unrestricted player counts #368

@compiler041

Description

@compiler041

Bug Description

Description

The TournamentHub tournament creation form currently has no validation on:

  • Start date — users can select past dates, which leads to invalid tournaments
  • Player count — there is no minimum or maximum limit enforced, allowing nonsensical values

Expected Behavior

  • Past dates should be rejected with a clear error message
  • Player count should be validated against a defined min/max range

Proposed Fix

Add client-side validation in TournamentHub.tsx to check date and player count before form submission.

##Screenshot:
Image

Steps to Reproduce

  1. Navigate to the TournamentHub page
  2. Open the tournament creation form
  3. Enter a past date as the start date and submit — no error is shown
  4. Enter 0 or an extremely large player count and submit — no error is shown

Environment Details

  • Frontend: React / TypeScript
  • File affected: frontend/src/Pages/TournamentHub.tsx

Impact

Critical - Application is unusable

Code of Conduct

  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions