RealDevSquad / RealDevSquad/website-backend
Fix `joi` validation for payload data
Open
Nobody has claimed this yet.
backend
bug
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Issue
Currently the joi validation limit is for minimum characters required but it should be actually minimum words required because of the expectation from the feature
- Here,
min(limit)method for string characters not for words entered.

Solution
- Fix the validation to check for number of words not for number of characters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the payload validation code for the Joi min(limit) usage and inspect how the submitted data is validated. Confirm the intended word-count behavior with the existing validation flow, then verify that values are accepted or rejected according to the required number of words.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100