Frontmatter
| id | 4697 |
| title | Add DACH country codes for post code validation |
| state | Closed |
| labels | enhancement |
| assignees | [] |
| createdAt | Aug 11, 2023, 11:15 AM |
| updatedAt | Aug 11, 2023, 1:41 PM |
| githubUrl | https://github.com/neomjs/neo/issues/4697 |
| author | r-l-d |
| commentsCount | 3 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Aug 11, 2023, 1:41 PM |
Add DACH country codes for post code validation

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
Aug 11, 2023, 1:41 PM
thx! just cleaned up the formatting.
tobiu closed this issue on Aug 11, 2023, 1:41 PM
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.