Morph-UK's avatar

UK postcode validator

I built a UK postcode validator for Laravel.

Designed to work with Laravel's form validation, but also works manually as a facade pattern.

Features:

  • Checks postcode against an external API
  • Uses ONS and Ordnance Survey postcode data
  • Determines postcode country
  • Supports England, Wales, Scotland and Northern Ireland
  • Supports the Isle of Man and the Channel Islands
  • Falls back to regex validation if the external API is unavailable
  • Allows countries or areas to be excluded

Details here:

https://github.com/chisnall/postcode

0 likes
0 replies

Please or to participate in this conversation.