parameter
parameter copied to clipboard
value is null should not validate
I have the problem.
I want to set some value to null. but it throw an error.
const rule = { transferDate: {type: 'string', required: false, allowEmpty: true}}
let someData = {transferDate: '2018-07-02'}
req.body = {transferDate: null}
{ message: 'should be a string', code: 'invalid', field: 'transferDate' }
Codecov Report
Merging #42 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #42 +/- ##
======================================
Coverage 99.5% 99.5%
======================================
Files 1 1
Lines 201 201
Branches 73 73
======================================
Hits 200 200
Misses 1 1
| Impacted Files | Coverage Δ | |
|---|---|---|
| index.js | 99.5% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update eadccb1...4d5e213. Read the comment docs.
这么好的提案,为什么没有通过合并呢。