2017 © Pedro Peláez
 

library zip-zapper

Validates Zip/Postal Codes for any country and gives that countries name for thier verions of Zip/Post code

image

detain/zip-zapper

Validates Zip/Postal Codes for any country and gives that countries name for thier verions of Zip/Post code

  • Tuesday, July 24, 2018
  • by detain
  • Repository
  • 1 Watchers
  • 4 Stars
  • 226 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

Zip Zapper

Validates Zip / Postal type codes by country with some features, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads Reference Status Build Status Code Climate Scrutinizer Code Quality Codacy Badge, (*2)

Postal Systems by Country
DMOZ Post/Zip Code Info+DB
List of Postal Codes
, (*3)

Based on a similar project sirprize/postal-code-validator but expanded on it adding over 100 new validations and updating ther others using mostly the Wikipedia postal codes list and some other features I needed in zip validation., (*4)

Installation

composer require detain/zip-zapper

Usage

Check If Country Is Supported

use Detain\ZipZapper\Validator;

$validator = new Validator();
$validator->hasCountry('CH'); // returns true

Check If Postal Code Is Properly Formatted

use Detain\ZipZapper\Validator;

$validator = new Validator();
$validator->isValid('CH', 'usjU87jsdf'); // returns false
$validator->isValid('CH', '3007'); // returns true

Get The Possible Formats For a Specific Country

use Detain\ZipZapper\Validator;

$validator = new Validator();
$validator->getFormats('GB'); // returns array('@@## #@@', '@#@ #@@', '@@# #@@', '@@#@ #@@', '@## #@@', '@# #@@')

Formatting

  • # = 0-9
  • @ = a-zA-Z

The Versions

24/07 2018

dev-master

9999999-dev https://detain.github.io/zip-zapper

Validates Zip/Postal Codes for any country and gives that countries name for thier verions of Zip/Post code

  Sources   Download

MIT

The Requires

 

The Development Requires

validator postcode zip cep postal code zipcode zip code cap plz eircode npa pin code postal expedition code postal addressing codde numro postal dacheminement postal index number postal routing number zone improvement plan

18/08 2017

v1.0.1

1.0.1.0 https://detain.github.io/zip-zapper

Validates Zip/Postal Codes for any country and gives that countries name for thier verions of Zip/Post code

  Sources   Download

MIT

The Requires

 

The Development Requires

validator postcode zip cep postal code zipcode zip code cap plz eircode npa pin code postal expedition code postal addressing codde numro postal dacheminement postal index number postal routing number zone improvement plan

22/03 2017

v1.0.0

1.0.0.0 https://detain.github.io/zip-zapper

Validates Zip/Postal Codes for any country and gives that countries name for thier verions of Zip/Post code

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

validator postcode zip cep postal code zipcode zip code cap plz eircode npa pin code postal expedition code postal addressing codde numro postal dacheminement postal index number postal routing number zone improvement plan