We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712b386 commit dbdd97fCopy full SHA for dbdd97f
src/index.js
@@ -187,8 +187,6 @@ Schema.prototype = {
187
format(options.messages.required, rule.field),
188
),
189
];
190
- } else {
191
- errors = [];
192
}
193
return doIt(errors);
194
@@ -248,7 +246,10 @@ Schema.prototype = {
248
246
249
247
250
if (res && res.then) {
251
- res.then(() => cb(), e => cb(e));
+ res.then(
+ () => cb(),
+ e => cb(e),
252
+ );
253
254
},
255
results => {
@@ -262,7 +263,7 @@ Schema.prototype = {
262
263
264
if (
265
typeof rule.validator !== 'function' &&
- (rule.type && !validators.hasOwnProperty(rule.type))
266
+ rule.type && !validators.hasOwnProperty(rule.type)
267
) {
268
throw new Error(format('Unknown rule type %s', rule.type));
269
0 commit comments