Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Deduplicated test fixtures: shared Google Geocoder payloads (factory exported from `postalCodeGoogleAddress.js`), address/geolocation mock bases, and `sharedMockRuleFields` for `useOneLevel` / `useThreeLevels` to satisfy Sonar CPD on new code.

### Fixed

- Virgin Islands' postal code validation

## [3.42.0] - 2025-12-09

### Added
Expand Down
4 changes: 2 additions & 2 deletions react/country/VIR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
fixedLabel: 'ZIP',
required: true,
mask: '99999-9999',
regex: '^008(01|02|03|04|05|20|21|22|23|24|30|31|40|41|50|51)-\d{0,4}$',
// Asserts zipcode starts with 008, then contains one of the local accepted area values, then followed by hyphen and 4 digits.
regex: '^008(01|02|03|04|05|20|21|22|23|24|30|31|40|41|50|51)(-\d{4})?$',

Check warning on line 22 in react/country/VIR.ts

View check run for this annotation

Sonar - Workflows / SonarQube Code Analysis

react/country/VIR.ts#L22

Unnecessary escape character: \d.
// Asserts zipcode starts with 008, then contains one of the local accepted area values, optionally followed by hyphen and exactly 4 digits.
postalCodeAPI: true,
forgottenURL: 'https://tools.usps.com/go/ZipLookupAction!input.action',
size: 'small',
Expand Down
Loading