Skip to content

Commit

Permalink
fix(Field): validate no names fix #913
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkahn committed Jul 23, 2019
1 parent 759f744 commit d131416
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ class Field {

if (!hasRule) {
const errors = this.formatGetErrors(fieldNames);
callback && callback(errors, this.getValues(fieldNames));
callback &&
callback(errors, this.getValues(names ? fieldNames : []));
return;
}

Expand Down Expand Up @@ -566,7 +567,8 @@ class Field {
}

// eslint-disable-next-line callback-return
callback && callback(errorsGroup, this.getValues(fieldNames));
callback &&
callback(errorsGroup, this.getValues(names ? fieldNames : []));
this._reRender();

if (errorsGroup && this.options.scrollToFirstError) {
Expand Down

0 comments on commit d131416

Please sign in to comment.