diff --git a/src/pages/EnablePayments/AdditionalDetailsStep.js b/src/pages/EnablePayments/AdditionalDetailsStep.js index ba3dc07f410a..d02b1e940207 100644 --- a/src/pages/EnablePayments/AdditionalDetailsStep.js +++ b/src/pages/EnablePayments/AdditionalDetailsStep.js @@ -94,13 +94,17 @@ class AdditionalDetailsStep extends React.Component { ssn: lodashGet(props.walletAdditionalDetailsDraft, 'ssn', ''), }; - const formHelper = new FormHelper({ + this.formHelper = new FormHelper({ errorPath: 'walletAdditionalDetails.errorFields', setErrors: Wallet.setAdditionalDetailsErrors, }); + } - this.getErrors = () => formHelper.getErrors(props); - this.clearError = path => formHelper.clearError(props, path); + /** + * @returns {Object} + */ + getErrors() { + return this.formHelper.getErrors(this.props); } /** @@ -115,6 +119,13 @@ class AdditionalDetailsStep extends React.Component { return `${this.props.translate(this.fieldNameTranslationKeys[fieldName])} ${this.props.translate('common.isRequiredField')}.`; } + /** + * @param {String} path + */ + clearError(path) { + this.formHelper.clearError(this.props, path); + } + /** * @returns {Boolean} */