Skip to content

Commit

Permalink
Merge pull request #11618 from Expensify/OSBotify-cherry-pick-staging…
Browse files Browse the repository at this point in the history
…-11616

🍒 Cherry pick PR #11616 to staging 🍒
  • Loading branch information
OSBotify authored Oct 5, 2022
2 parents 30a0e74 + 743a47c commit f15d315
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001021103
versionName "1.2.11-3"
versionCode 1001021104
versionName "1.2.11-4"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.11.3</string>
<string>1.2.11.4</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.11.3</string>
<string>1.2.11.4</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.2.11-3",
"version": "1.2.11-4",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
4 changes: 4 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ const CONST = {
},
REGEX: {
US_ACCOUNT_NUMBER: /^[0-9]{4,17}$/,

// If the account number length is from 4 to 13 digits, we show the last 4 digits and hide the rest with X
// If the length is longer than 13 digits, we show the first 6 and last 4 digits, hiding the rest with X
MASKED_US_ACCOUNT_NUMBER: /^[X]{0,9}[0-9]{4}$|^[0-9]{6}[X]{4,7}[0-9]{4}$/,
SWIFT_BIC: /^[A-Za-z0-9]{8,11}$/,
},
VERIFICATION_MAX_ATTEMPTS: 7,
Expand Down
8 changes: 7 additions & 1 deletion src/pages/ReimbursementAccount/BankAccountManualStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ class BankAccountManualStep extends React.Component {
const errorFields = {};
const routingNumber = values.routingNumber && values.routingNumber.trim();

if (!values.accountNumber || !CONST.BANK_ACCOUNT.REGEX.US_ACCOUNT_NUMBER.test(values.accountNumber.trim())) {
if (
!values.accountNumber
|| (!CONST.BANK_ACCOUNT.REGEX.US_ACCOUNT_NUMBER.test(values.accountNumber.trim()) && !CONST.BANK_ACCOUNT.REGEX.MASKED_US_ACCOUNT_NUMBER.test(values.accountNumber.trim()))
) {
errorFields.accountNumber = this.props.translate('bankAccount.error.accountNumber');
}
if (!routingNumber || !CONST.BANK_ACCOUNT.REGEX.SWIFT_BIC.test(routingNumber) || !ValidationUtils.isValidRoutingNumber(routingNumber)) {
Expand Down Expand Up @@ -91,6 +94,7 @@ class BankAccountManualStep extends React.Component {
<TextInput
inputID="routingNumber"
label={this.props.translate('bankAccount.routingNumber')}
defaultValue={ReimbursementAccountUtils.getDefaultStateForField(this.props, 'routingNumber', '')}
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD}
disabled={shouldDisableInputs}
shouldSaveDraft
Expand All @@ -99,6 +103,7 @@ class BankAccountManualStep extends React.Component {
inputID="accountNumber"
containerStyles={[styles.mt4]}
label={this.props.translate('bankAccount.accountNumber')}
defaultValue={ReimbursementAccountUtils.getDefaultStateForField(this.props, 'accountNumber', '')}
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD}
disabled={shouldDisableInputs}
shouldSaveDraft
Expand All @@ -116,6 +121,7 @@ class BankAccountManualStep extends React.Component {
</TextLink>
</View>
)}
defaultValue={ReimbursementAccountUtils.getDefaultStateForField(this.props, 'acceptTerms', true)}
shouldSaveDraft
/>
</Form>
Expand Down

0 comments on commit f15d315

Please sign in to comment.