diff --git a/src/libs/ErrorUtils.js b/src/libs/ErrorUtils.js index 81899cb7c849..95bbad5f5409 100644 --- a/src/libs/ErrorUtils.js +++ b/src/libs/ErrorUtils.js @@ -94,7 +94,7 @@ function getLatestErrorField(onyxData, fieldName) { * @param {String} fieldName * @returns {Object} */ -function getFirstErrorField(onyxData, fieldName) { +function getEarliestErrorField(onyxData, fieldName) { const errorsForField = lodashGet(onyxData, ['errorFields', fieldName], {}); if (_.isEmpty(errorsForField)) { @@ -132,4 +132,4 @@ function addErrorMessage(errors, inputID, message) { } } -export {getAuthenticateErrorMessage, getMicroSecondOnyxError, getLatestErrorMessage, getLatestErrorField, getFirstErrorField, addErrorMessage}; +export {getAuthenticateErrorMessage, getMicroSecondOnyxError, getLatestErrorMessage, getLatestErrorField, getEarliestErrorField, addErrorMessage}; diff --git a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js index 57a195b53db8..a24b7036bd48 100644 --- a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js @@ -165,7 +165,7 @@ function BaseValidateCodeForm(props) { User.clearContactMethodErrors(props.contactMethod, 'validateLogin')} >