LearnNewsExamplesServices
Frontmatter
id4697
titleAdd DACH country codes for post code validation
stateClosed
labels
enhancement
assignees[]
createdAtAug 11, 2023, 11:15 AM
updatedAtAug 11, 2023, 1:41 PM
githubUrlhttps://github.com/neomjs/neo/issues/4697
authorr-l-d
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtAug 11, 2023, 1:41 PM

Add DACH country codes for post code validation

Closed v8.1.0 enhancement
r-l-d
r-l-d commented on Aug 11, 2023, 11:15 AM

Is your feature request related to a problem? Please describe. I need to validate DACH postal codes. Currently, in the src>form>field>ZipCode.mjs file, only DE is listed in the countryCodes opbject.

Describe the solution you'd like I would like AT and CH added to the countryCodes object to validate their postal codes:

static countryCodes = { DE: /^(?!01000|99999)(0[1-9]\d{3}|[1-9]\d{4})$/, AT: /^\d{4}$/, CH: /^\d{4}$/ }

Describe alternatives you've considered Perhaps it is possible to do this with the Overwrites file instead? I'm not sure, since the countryCodes object is not part of the ZipCode config.

Additional context Add any other context or screenshots about the feature request here.

tobiu
tobiu Aug 11, 2023, 11:48 AM

hi ross, you are very welcome to send a pull request :)

ping me in case you have questions on how that works (creating a fork).

@r-l-d - 2023-08-11T11:28:37Z

Thanks @tobiu, I've created a PR here: https://github.com/neomjs/neo/pull/4699

tobiu referenced in commit 881c0c3 - "#4697 form.field.ZipCode: formatting cleanup" on Aug 11, 2023, 1:41 PM
tobiu
tobiu Aug 11, 2023, 1:41 PM

thx! just cleaned up the formatting.

tobiu closed this issue on Aug 11, 2023, 1:41 PM