diff --git a/lib/main/general-validators.ts b/lib/main/general-validators.ts index ae5fe27..9cc05ca 100644 --- a/lib/main/general-validators.ts +++ b/lib/main/general-validators.ts @@ -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) diff --git a/test/general-validators.spec.ts b/test/general-validators.spec.ts index 6e46ae9..5da1508 100644 --- a/test/general-validators.spec.ts +++ b/test/general-validators.spec.ts @@ -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 }) =>