Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

value is null should not validate#42

Open
gaochengyidlmu wants to merge 2 commits intonode-modules:master from
gaochengyidlmu:master
Open

value is null should not validate #42
gaochengyidlmu wants to merge 2 commits intonode-modules:master from
gaochengyidlmu:master

Conversation

@gaochengyidlmu
Copy link

@gaochengyidlmu gaochengyidlmu commented Jul 2, 2018

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' }

Copy link

codecov-io commented Jul 2, 2018
edited by codecov bot
Loading

Codecov Report

Merging #42 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@ 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%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eadccb1...4d5e213. Read the comment docs.

Copy link

这么好的提案,为什么没有通过合并呢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /