Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Mask field as NaN for Alphanumerical Postal Codes #609

Closed
Closed
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 @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Input field for Postal Code at CAN, GBR, IRL and NLD for mobile.

## [4.24.7] - 2024-08-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion react/country/CAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
maxLength: 50,
label: 'postalCode',
required: true,
mask: 'A9A 9A9',
mask: NaN,
regex: '^[A-z][0-9][A-z]\\ ?[0-9][A-z][0-9]$',
postalCodeAPI: true,
forgottenURL:
Expand Down
5 changes: 3 additions & 2 deletions react/country/GBR.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export default {
maxLength: 50,
fixedLabel: 'Postcode',
required: true,
mask: '',
regex: /^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/,
mask: NaN,
regex:
/^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/,
postalCodeAPI: false,
size: 'small',
autoComplete: 'nope',
Expand Down
2 changes: 1 addition & 1 deletion react/country/IRL.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
maxLength: 8,
label: 'postalCode',
required: true,
mask: '999 9999',
mask: NaN,
regex: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$/,
postalCodeAPI: true,
size: 'small',
Expand Down
2 changes: 1 addition & 1 deletion react/country/NLD.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
label: 'postalCode',
maxLength: 7,
required: true,
mask: '9999 AA',
mask: NaN,
regex: /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-zA-Z]{2}$/,
postalCodeAPI: false,
size: 'small',
Expand Down
Loading