square-bit / laravel-pt-rules
Validation rules relevant to Portugal
Installs: 1 243
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires (Dev)
- laravel/framework: ^8.13|^9.0
- phpunit/phpunit: ^9.4
README
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
$ composer require square-bit/laravel-pt-rules
Usage
Just like any other validation rule, simply add the desired class to the list of rules. Example:
return Validator::make($data, [
[...]
'nif' => ['required', new NIF()],
[...]
]);
Available rules
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 info@square-bit.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.