bsoc-bitbyte / bsoc-bitbyte/Splitt
[BUG] Validation fails when optional form fields are submitted empty
- Dominant language
- JavaScript
- Stars
- 14
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
### 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_
Contributor guide
Assessment
This issue has not been assessed yet.