Skip to content

Commit

Permalink
Fixed Ecuador ZIP code regex validation to accept both 6-digit postal…
Browse files Browse the repository at this point in the history
… codes and the older 4-digit municipality codes.

Location APIs results with 6-digit ZIP codes were being considered invalid.
  • Loading branch information
kaio-donadelli authored Jun 6, 2024
2 parents 6c49c17 + 8d9a8d5 commit f2598ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [4.24.2] - 2024-06-05
### Fixed

- Ecuador ZIP code regex validation to accept both 6-digit postal codes and the older 4-digit municipality codes used in the list of provinces.

## [4.24.2] - 2024-06-05

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion react/country/ECU.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ export default {
maxLength: 50,
name: 'postalCode',
postalCodeAPI: false,
regex: /^([\d]{4})$/,
regex: /^([\d]{6}|[\d]{4})$/,
size: 'small',
},
{
Expand Down

0 comments on commit f2598ab

Please sign in to comment.