You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic used to generate canadian zipcodes is wrong. The current format mask is this: '?#? #?#'. However, not all letters are valid in all the positions, so calling bothify on that may return invalid postal codes.
Valid canadian postal codes should match this regexp: /^[A-CEGHJK-NPR-TVXY][0-9][A-CEGHJK-NPR-TV-Z] [0-9][A-CEGHJK-NPR-TV-Z][0-9]$/
If you wish, I will fork this repo and implement the necessary changes. I just wanted to open the issue to see if something like this would be merged, and to link the PR back to the issue for discussion.
The text was updated successfully, but these errors were encountered:
Hopefully @steveclarke knows more, he made the first implementation. 👍
It would be great if you could create a fix-branch and a PR if the postal codes are wrong generated. 🎁
The logic used to generate canadian zipcodes is wrong. The current format mask is this:
'?#? #?#'
. However, not all letters are valid in all the positions, so callingbothify
on that may return invalid postal codes.Valid canadian postal codes should match this regexp:
/^[A-CEGHJK-NPR-TVXY][0-9][A-CEGHJK-NPR-TV-Z] [0-9][A-CEGHJK-NPR-TV-Z][0-9]$/
If you wish, I will fork this repo and implement the necessary changes. I just wanted to open the issue to see if something like this would be merged, and to link the PR back to the issue for discussion.
The text was updated successfully, but these errors were encountered: