cline / postal-code
Validates and formats postal codes for all countries with a Laravel-first approach
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/cline/postal-code
Requires
- php: ^8.5.0
- illuminate/contracts: ^12.0
- illuminate/support: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- cline/php-cs-fixer: ^1.0.4
- driftingly/rector-laravel: ^2.0.7
- ergebnis/composer-normalize: ^2.49@dev
- laravel/pint: ^1.25.1
- orchestra/testbench: ^10.6
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/phpstan: ^2.1.30
- rector/rector: ^2.2.1
- symfony/var-dumper: ^7.3.4
README
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.