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

[UK] Improved postcode validation. #243

Merged
merged 1 commit into from
Oct 13, 2016
Merged

Conversation

dracos
Copy link
Member

@dracos dracos commented Jun 15, 2016

This is much quicker, and includes a missing "P" in the third character list. Thanks to Andy Gimblett for suggesting these changes to the https://github.com/mysociety/uk-postcode-utils package.

Switch to using the uk-postcode-utils package which is quicker,
and includes a missing "P" in the third character list.
Copy link
Contributor

@stevenday stevenday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, less code is great. General thought, I wonder if SPECIAL_POSTCODES should be in ukpostcodeutils too?

@dracos
Copy link
Member Author

dracos commented Oct 13, 2016

It seemed like you might well not want to treat those as valid, or have a different list, so left the library to accept whatever "extra" you decided. It could be a list stored there, I guess, but didn't seem worth it.

@dracos dracos merged commit bebd65f into master Oct 13, 2016
@dracos dracos removed the Reviewing label Oct 13, 2016
@stevenday
Copy link
Contributor

It seemed like you might well not want to treat those as valid, or have a different list, so left the library to accept whatever "extra" you decided. It could be a list stored there, I guess, but didn't seem worth it.

I dunno, it's exactly the sort of thing I'd be delighted to find out a postcode library had built in. Obviously it might need some options or something - I'll make a ticket on postcodeutils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants