Skip to content

Commit

Permalink
Merge pull request #49827 from cretadn22/add-error-message
Browse files Browse the repository at this point in the history
Display the correct message in custom list page
  • Loading branch information
luacmartins authored Sep 30, 2024
2 parents 4b5c0ff + fc91c4c commit 0e3b82c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ function NetSuiteImportAddCustomListPage({policy}: WithPolicyConnectionsProps) {
}
return errors;
case CONST.NETSUITE_CUSTOM_FIELD_SUBSTEP_INDEXES.CUSTOM_LISTS.MAPPING:
return ValidationUtils.getFieldRequiredErrors(values, [INPUT_IDS.MAPPING]);
if (!ValidationUtils.isRequiredFulfilled(values[INPUT_IDS.MAPPING])) {
errors[INPUT_IDS.MAPPING] = translate('common.error.pleaseSelectOne');
}
return errors;
default:
return errors;
}
Expand Down Expand Up @@ -163,6 +166,7 @@ function NetSuiteImportAddCustomListPage({policy}: WithPolicyConnectionsProps) {
enabledWhenOffline
isSubmitDisabled={!!config?.pendingFields?.customLists}
submitFlexEnabled={submitFlexAllowed}
shouldHideFixErrorsAlert={screenIndex === CONST.NETSUITE_CUSTOM_FIELD_SUBSTEP_INDEXES.CUSTOM_LISTS.MAPPING}
>
<SubStep
isEditing={isEditing}
Expand Down

0 comments on commit 0e3b82c

Please sign in to comment.