Skip to content

[Medium]: Add robust validation and inline errors for event creation form #7

@AnirudhSinghRajora

Description

@AnirudhSinghRajora

Problem Statement

Create event form currently depends mostly on basic input attributes and generic error handling. Users need clear inline validation feedback.

Proposed Approach

Define validation rules for each field.
Add local error state per input field.
Validate on input change and submit.
Show inline error text near each invalid field.
Disable submit while required fields are invalid.
Keep current successful flow unchanged.

Files and Scope

event-dappp/src/components/CreateEventPage.jsx

Acceptance Criteria

  • Date field requires future date and shows inline error if invalid
  • Numeric fields validate positive and sensible values
  • Submit remains disabled while form is invalid
  • Error messages are clear and field-specific

Test Plan

Enter invalid date, ticket count, ticket price, and stake values.
Verify inline errors appear for the correct fields.
Enter valid values and confirm submit is enabled.
Confirm valid submission still works as expected.

Risks and Edge Cases

Overly strict validation could block valid user input.
Need to ensure decimal values are handled correctly.

Metadata

Metadata

Assignees

No one assigned

    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