Comments (6)
!? the santa claus postcode is real
from govuk-coronavirus-vulnerable-people-form.
When this was first implemented (for the Brexit EU Funding Form), we took the regex from https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation.
This seems to cover all formats of UK postcode, plus the BFPO addresses, non-geographic special cases and British Overseas Territories.
from govuk-coronavirus-vulnerable-people-form.
Humm this might be tough,
I remember reading this once:
https://github.com/mysociety/mapit/blob/f186a5dd13f71e63486d0ac792cd3bca8f72ebfc/mapit_gb/countries.py
from govuk-coronavirus-vulnerable-people-form.
SPECIAL_POSTCODES = (
'ASCN1ZZ', # Ascension Island
'BBND1ZZ', # BIOT
'BIQQ1ZZ', # British Antarctic Territory
'FIQQ1ZZ', # Falkland Islands
'PCRN1ZZ', # Pitcairn Islands
'SIQQ1ZZ', # South Georgia and the South Sandwich Islands
'STHL1ZZ', # St Helena
'TDCU1ZZ', # Tristan da Cunha
'TKCA1ZZ', # Turks and Caicos Islands
'GIR0AA', 'G1R0AA', # Girobank
'SANTA1', 'XM45HQ', # Santa Claus
)
from govuk-coronavirus-vulnerable-people-form.
as long as you're confident and have used the logic elsewhere, feel free to close :)
from govuk-coronavirus-vulnerable-people-form.
We could probably simplify the regular expression by removing the British Overseas Territories. If we don't already have it, we should probably have a test to check the following are all valid:
AA9A 9AA
A9A 9AA
A9 9AA
A99 9AA
AA9 9AA
AA99 9AA
BFPO 1
BFPO 9
Plus all of the above without a space.
from govuk-coronavirus-vulnerable-people-form.
Related Issues (20)
- Ensure hint text is black
- User can say they don't live in England from check answers page
- Make sure this service is not indexed from Google HOT 1
- Check your answers summary table needs more whitespace below it
- Update 'home' breadcrumbs to 'back buttons'
- Support address second line does not have a label
- 404 and 500 error pages load entirety of GOV.UK Frontend / Design System CSS
- Some error summarys linking to the form tag instead of the first input HOT 1
- Assets requested from CSS do not have a long cache time HOT 4
- Refactor: Upstream improvements to publishing components gem to remove TODOs in custom Scss
- Host the favicon.ico 'locally' for improved performance
- Add service name to header HOT 2
- Validation: Name, assumes that all people have a first name and last name. Is this the case? HOT 1
- Usability: Should the 'NHS Number' text input use a numeric keyboard? HOT 2
- Refactor: should temp or cough related code be removed? HOT 1
- Review use of autocomplete and spellcheck attributes HOT 2
- Performance: CDN Static assets, consider caching policy
- Performance: minify CSS
- Contact page form errors, doesn't retain form values
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govuk-coronavirus-vulnerable-people-form.