https://github.com/beastbytes/postal-code-validator
Yii3 postal code validator
https://github.com/beastbytes/postal-code-validator
postal-code validator yii3
Last synced: 5 months ago
JSON representation
Yii3 postal code validator
- Host: GitHub
- URL: https://github.com/beastbytes/postal-code-validator
- Owner: beastbytes
- License: other
- Created: 2023-01-28T15:04:12.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T12:10:57.000Z (10 months ago)
- Last Synced: 2025-04-11T22:13:23.674Z (9 months ago)
- Topics: postal-code, validator, yii3
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Postal Code Validator (postal-code-validator)
Provides validation for postal codes.
Postal codes can be validated against a single country or a list of countries.
A postalCodeDataInterface implementation is also required, e.g. beastbytes/postal-code-data-php
**NOTE:** postal-code-validator does _**not**_ guarantee that a postal code exists only that it is in a valid format. For some countries that is - for example - it has the right number of digits, characters in the right place etc. However, for many the validator also checks that disallowed characters are not used, number ranges are correct, etc. If you can improve validation for a country please submit a pull request.
For license information see the [LICENSE](LICENSE.md) file.
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist beastbytes/postal-code-validator
```
or add
```json
"beastbytes/postal-code-validator": "^1.0.0"
```
to the "require" section of your composer.json.