iiitl / iiitl/Event_Dapp

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

Open
#7 5 comments 0 reactions 0 assignees View on GitHub
difficulty:medium help wanted ui-ux
Dominant language
JavaScript
Stars
0
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Open event-dappp/src/components/CreateEventPage.jsx and first trace the existing field values, submission flow, and successful submission behavior. Exercise invalid dates, ticket counts, prices, and stakes, then verify field-specific inline errors and disabled submission; valid values should still submit unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.