Skip to content

Commit

Permalink
Merge pull request #53 from Luukkasz/master
Browse files Browse the repository at this point in the history
update allowed length of US account number
  • Loading branch information
marer authored Sep 22, 2023
2 parents 8760fc5 + 7eb58be commit b992770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main/general-validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const isLanNumberValidator = (value: string, country?: string): boolean =
NZ: /^[A-Za-z0-9]{15,16}$/,
SG: /^[A-Za-z0-9]{1,14}$/,
TW: /^[A-Za-z0-9]{1,22}$/,
US: /^[A-Za-z0-9]{10,30}$/,
US: /^[A-Za-z0-9]{9,30}$/,
}
const defaultRule = /^[A-Za-z0-9]{1,22}$/
return !!value.replace(/ /g, '').match(lanCountriesRules[country] ? lanCountriesRules[country] : defaultRule)
Expand Down
2 changes: 1 addition & 1 deletion test/general-validators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ describe('Validators', () => {
{ country: 'NZ', min: 15, max: 16 },
{ country: 'SG', min: 1, max: 14 },
{ country: 'TW', min: 1, max: 22 },
{ country: 'US', min: 10, max: 30 },
{ country: 'US', min: 9, max: 30 },
{ country: 'OTHER', min: 1, max: 22 },
{ country: undefined, min: 1, max: 22 },
].forEach(({ country, min, max }) =>
Expand Down

0 comments on commit b992770

Please sign in to comment.