Download the PHP package square-bit/laravel-pt-rules without Composer
On this page you can find all versions of the php package square-bit/laravel-pt-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download square-bit/laravel-pt-rules
More information about square-bit/laravel-pt-rules
Files in square-bit/laravel-pt-rules
Package laravel-pt-rules
Short Description Validation rules relevant to Portugal
License MIT
Homepage https://github.com/square-bit/laravel-pt-rules
Informations about the package laravel-pt-rules
Set of validation rules relevant for Portugal
This package provides a set of Rules for Laravel 8 that are mainly useful to validate Portuguese ... stuff .... such as NIFs and CCs.
Installation
Via Composer
Usage
Just like any other validation rule, simply add the desired class to the list of rules. Example:
Available rules
Class | Description |
---|---|
NIF | Checks if the input is a valid Portuguese Fiscal ID number. Accepts both with and without the country preffix, ex: '123456789' or 'PT123456789' |
CompanyNIF | Checks if the input is a valid Portuguese Fiscal ID number for a company (i.e. it starts with 5 or 9). Accepts both with and without the country preffix, ex: '523456789' or 'PT523456789' |
BI | Checks if the input is a valid Portuguese Identification Card number. (requires the entire number, including the last digit) |
CC | Checks if the input is a valid Portuguese Citizen Card number. (requires the full number, ex: "12233456 7 ZZ0") |
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Squarebit
- All Contributors
License
MIT. Please see the license file for more information.