Skip to content

fix: add validation for empty or whitespace-only tasks#83

Open
RUSHILPATEL33 wants to merge 1 commit into
JIYAJAIN30:mainfrom
RUSHILPATEL33:fix/empty-task-validation
Open

fix: add validation for empty or whitespace-only tasks#83
RUSHILPATEL33 wants to merge 1 commit into
JIYAJAIN30:mainfrom
RUSHILPATEL33:fix/empty-task-validation

Conversation

@RUSHILPATEL33
Copy link
Copy Markdown

@RUSHILPATEL33 RUSHILPATEL33 commented May 16, 2026

Fixes #35

Problem

Clicking Add with an empty or whitespace-only input silently added a blank task, breaking the progress tracker.

Fix

  • Added input validation in addTask()
  • Empty input now shows a red border and error placeholder message
  • Resets back to normal after 2 seconds

Tested

✅ Empty input shows red border
✅ Whitespace-only input is rejected
✅ Valid tasks still add normally

Screenshot proof of fix working ✅
Empty input now shows red border with error message.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty or whitespace-only tasks can be added to the list

1 participant