[Bug] Joi.date().iso() accepts to receive incomplete dates
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
#### Support plan
* *is this issue currently blocking your project?* (yes/no): Yes
* *is this issue affecting a production system?* (yes/no): Yes
#### Context
* *module version with issue*: 17.1.1
* Joi autocomplete an invalid format
#### What are you trying to achieve or the steps to reproduce?
* Yes, by https://joi.dev/tester/
#### What was the result you got?


#### What result did you expect?
* Validation Error: "birthDate" must be in ISO 8601 date format
Contributor guide
Research direction
Reproduce the behavior with Joi.date().iso() using the example shown in the issue or the Joi tester, and compare incomplete dates with the expected ISO 8601 validation error. Trace the date validation entry point and add or update coverage so incomplete dates are rejected while valid ISO dates continue to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100