Repository navigation
Releases: sirlisko/uk-postcode-validator
Releases Β· sirlisko/uk-postcode-validator
Release list
v2.0.0
Breaking
- Stricter validation. Postcodes are now checked against the per-position letter rules from BS 7666, and the whole string must match. These were accepted by 1.x and are now rejected:
- text around a postcode, e.g.
"GIR0AA nonsense" - letters not used in a given position, e.g.
"Q1 1AA","N7 7CA","ZZ99 9ZZ"
- text around a postcode, e.g.
- Build targets ES2017 instead of ES5.
Features
- Named
isValidexport:import { isValid } from "uk-postcode-validator"orconst { isValid } = require("uk-postcode-validator"). The default export still works. - Surrounding whitespace and repeated spaces between the outward and inward codes are now accepted.
v1.1.3
Patch Changes
- cffb6eb: Refined NPM package by including essential files exclusively.
v1.1.2
Patch Changes
- b300e86: Updated the documentation