Skip to content

Task name validation allows whitespace-only input without error #567

@inderjeet20

Description

@inderjeet20

Description

When saving a task without a name, the app correctly shows the error “This field is required”.

However, if the user enters only spaces in the task name field:

  • No validation error is shown
  • The task is not saved (which is good)
  • But the lack of feedback is confusing

Additionally, if the task name starts with leading spaces (e.g. " Task name"), the task also fails to save without any error message.


Actual Behavior

  • Whitespace-only input shows no validation error
  • Task is not saved, but no feedback is provided
  • Leading spaces in task name prevent saving without explanation

Why this matters

  • Silent validation failures confuse users
  • Whitespace-only input should not bypass required field validation
  • Trimming or validating input improves UX and data consistency

Steps to reproduce

Steps to Reproduce

  1. Create a new task
  2. Leave the task name empty
    • Observe: “This field is required” is shown
  3. Enter only spaces in the task name field
  4. Try to save the task
  5. Enter a valid name with leading spaces (e.g. " My Task")
  6. Try to save again

What was the expected result?

Expected Behavior

  • Whitespace-only input should be treated as empty and show “This field is required”
  • OR show a clear error such as “Task name cannot contain only spaces”
  • Leading spaces should either:
    • Be automatically trimmed, or
    • Show a validation error explaining why saving failed

Put here any screenshots or videos (optional)

Screen_Recording_20260122_215405.mp4

How can we contact you (optional)

No response

Would you like to work on this issue?

Yes

By submitting this issue, I have confirmed that:

  • I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions