From a43b50119c9821b64e4e3f728356752fff8c5717 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Thu, 15 Jun 2023 10:18:03 +0700 Subject: [PATCH] fix: merge main --- src/pages/settings/Profile/PersonalDetails/AddressPage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/settings/Profile/PersonalDetails/AddressPage.js b/src/pages/settings/Profile/PersonalDetails/AddressPage.js index 60e873125728..a3bcf5e4305b 100644 --- a/src/pages/settings/Profile/PersonalDetails/AddressPage.js +++ b/src/pages/settings/Profile/PersonalDetails/AddressPage.js @@ -57,7 +57,7 @@ const defaultProps = { * @param {Object} values - form input values */ function updateAddress(values) { - PersonalDetails.updateAddress(values.addressLine1.trim(), values.addressLine2.trim(), values.city.trim(), values.state.trim(), values.zipPostCode.trim(), values.country); + PersonalDetails.updateAddress(values.addressLine1.trim(), values.addressLine2.trim(), values.city.trim(), values.state.trim(), values.zipPostCode.trim().toUpperCase(), values.country); } function AddressPage(props) { @@ -104,14 +104,14 @@ function AddressPage(props) { const countryZipFormat = lodashGet(countryRegexDetails, 'samples'); if (countrySpecificZipRegex) { - if (!countrySpecificZipRegex.test(values.zipPostCode.trim())) { + if (!countrySpecificZipRegex.test(values.zipPostCode.trim().toUpperCase())) { if (ValidationUtils.isRequiredFulfilled(values.zipPostCode.trim())) { errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat', {zipFormat: countryZipFormat}); } else { errors.zipPostCode = translate('common.error.fieldRequired'); } } - } else if (!CONST.GENERIC_ZIP_CODE_REGEX.test(values.zipPostCode.trim())) { + } else if (!CONST.GENERIC_ZIP_CODE_REGEX.test(values.zipPostCode.trim().toUpperCase())) { errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat'); }