-
Notifications
You must be signed in to change notification settings - Fork 115
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #48 +/- ## ===================================== Coverage 100% 100% ===================================== Files 1 1 Lines 162 164 +2 Branches 56 57 +1 ===================================== + Hits 162 164 +2
Continue to review full report at Codecov.
|
The condition is when having a create and edit common interface , I may code like this:
const schema = { userId: { type: 'int' }, title: { required: false, type: 'string', }, brief: { required: false, type: 'string', }, content: { required: false, type: 'string', }, xxx1: { required: false, type: 'string', }, ... } ctx.validate(schema, myParams);
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.defaultRequired = opts.defaultRequired !== false;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for cr ! ~
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放一行吧,这样缩进有点奇怪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯嗯,已修改。 839d425
698d819 to
85e257b
Compare
docs: options.defaultRequired
fengmk2
commented
Sep 19, 2018
rebase ?
No description provided.