detain/zip-zapper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

detain/zip-zapper

最新稳定版本:v2.0.0

Composer 安装命令:

composer require detain/zip-zapper

包简介

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

README 文档

README

Validates Zip / Postal type codes by country with some features

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads Reference Status Build Status Code Climate Scrutinizer Code Quality Codacy Badge

Postal Systems by Country
DMOZ Post/Zip Code Info+DB
List of Postal Codes

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.

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

统计信息

  • 总下载量: 1.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-22