cline/postal-code
Validates and formats postal codes for all countries with a Laravel-first approach
Maintainers
Requires
- php: ^8.5.0
- facade/ignition-contracts: ^1.0.2
- laravel/framework: ^10.0 || ^11.0 || ^12.0 || ^13.0
- spatie/laravel-package-tools: ^1.93.0
Requires (Dev)
- cline/coding-standard: ^2.0.1
- orchestra/testbench: ^8.0 || ^9.0 || ^10.9
- symfony/var-dumper: ^6.0 || ^7.4.6 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 649c2dfe65c335cdb034aaca885a2a7599f6d792
- Brian Faust <brian.woop@cline.sh>
README
👁 GitHub Workflow Status
👁 Latest Version on Packagist
👁 Software License
👁 Total Downloads
Postal Code is a Laravel package for validating and formatting postal codes across 180+ countries. It provides a fluent API with automatic normalization, country-specific formatting, and comprehensive exception handling.
This is a fork of brick/postcode by Benjamin Morel, adapted for Laravel with additional features and a fluent API.
Requirements
Requires PHP 8.4+ and Laravel 12+
Installation
composer require cline/postal-code
Documentation
- Basic Usage - Validation, formatting, and the fluent API
- Custom Handlers - Creating and registering country handlers
- Exception Handling - Handling validation errors gracefully
- Laravel Integration - Validation rules, casts, Blade, and Livewire
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The MIT License. Please see License File for more information.
