Skip to content

Commit

Permalink
Changed type of returning error in formService to pass additional par…
Browse files Browse the repository at this point in the history
…ameters from validator
  • Loading branch information
AlioshaRabeshko committed Jul 29, 2021
1 parent 418b6ae commit 149e240
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/form/FormService.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ class FormService {
return {
value: data[fieldName],
isChanged: changes.hasOwnProperty(fieldName),
errors: errors.getFieldErrorMessages(fieldName),
warnings: warnings.getFieldErrorMessages(fieldName)
errors: errors.getFieldErrors(fieldName),
warnings: warnings.getFieldErrors(fieldName)
};
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/form/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ const FormMixin = {
return null;
}

const errors = this.state._formMixin.errors.getFieldErrorMessages(field) || [];
const warnings = this.state._formMixin.warnings.getFieldErrorMessages(field) || [];
const errors = this.state._formMixin.errors.getFieldErrors(field) || [];
const warnings = this.state._formMixin.warnings.getFieldErrors(field) || [];

return errors.concat(warnings);
},
Expand Down

0 comments on commit 149e240

Please sign in to comment.