eyedea-io / eyedea-io/syncano-validate
Non-required rules give error on empty parameters
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The following sample should pass:
```
const data = {
title: 'This is a title'
}
const rules = {
title: 'required|min:2',
description: 'min:20',
}
validate(data, rules)
```
However the description rule gives an error `{ description: 'The description field must be at least 20 characters.' }`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the validate(data, rules) entry point using the sample in the issue, then trace how the min:20 rule handles the missing description parameter. Done means optional rules allow an absent field while required rules still report missing values, and the sample validation passes without a description error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100