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

Inward code max length #13

Closed
ChappersJr opened this issue Feb 28, 2020 · 2 comments · Fixed by #14
Closed

Inward code max length #13

ChappersJr opened this issue Feb 28, 2020 · 2 comments · Fixed by #14

Comments

@ChappersJr
Copy link

Hey,

I've come across a potential issue with the Inward code for a United Kingdom postcode.

From what I've researched the length of the inward code is 3 characters.

Using this example: NN1 5LLL

Even though it's an invalid postcode (inward code being 4 characters long), it gets passed validation.

Resource: https://www.mrs.org.uk/pdf/postcodeformat.pdf

@axlon
Copy link
Owner

axlon commented Feb 28, 2020

Hello @ChappersJr, thank you for your bug report, I just tested this and I think you're right (I'm not from the UK myself so I'm not particularly knowledgable about UK postal codes)

Your example does indeed match, wrapping the pattern does seem to fix the issue, but I will need to run some tests to make sure nothing else breaks because of this change

@axlon
Copy link
Owner

axlon commented Feb 28, 2020

@ChappersJr please take a look at the change, I think this should fix the issue

@axlon axlon closed this as completed in #14 Mar 2, 2020
axlon added a commit that referenced this issue Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants