Skip to content

[BUG] Validation fails when optional form fields are submitted empty #14

@Luffy-D-Zoro

Description

@Luffy-D-Zoro

Browser

Chrome

Area

Post Ride and Post Intent Forms

Steps to reproduce

Post Ride Form :

  1. Start the project locally.
  2. Log in using Dev Login.
  3. Go to the Post Ride page.
  4. Fill all required ride details like direction, destination, departure time, total seats, and fare per head.
  5. Leave the optional Notes field empty.
  6. Submit the form.

Post Intent Form :

  1. Go to the Post Intent page.
  2. Fill all required intent details like direction, destination, earliest time, and latest time.
  3. Leave the optional Max Fare field empty.
  4. Submit the form.

Expected behavior

The form should be posted successfully because these fields are optional.

What actually happened

The request fails with a validation error.

Posting a ride works when a value such as "hi" is entered in the Notes field , but fails when the optional Notes field is left empty.

The same optional-field pattern exists in Post Intent, where empty Max Fare is sent as null even though the backend treats it as optional.

Logs / Screenshots

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmediummedium level issue

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