Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/global-innovation/laravel-cuit-validation-rule
Rule for the validation of the CUIT (Argentina) within Laravel Validator.
https://github.com/global-innovation/laravel-cuit-validation-rule
argentina cuit laravel-validator
Last synced: 6 days ago
JSON representation
Rule for the validation of the CUIT (Argentina) within Laravel Validator.
- Host: GitHub
- URL: https://github.com/global-innovation/laravel-cuit-validation-rule
- Owner: global-innovation
- License: mit
- Created: 2019-08-17T23:21:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-07T16:59:33.000Z (over 3 years ago)
- Last Synced: 2024-08-10T10:25:12.807Z (3 months ago)
- Topics: argentina, cuit, laravel-validator
- Language: PHP
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Laravel Validator Rule for CUIT
===============================# Installation
To install this package include it in your `composer.json`
```shell
composer require globalinnovation/laravel-cuit-validation-rule
```Add the following lines to the `boot` method of the `AppServiceProvider` class ([Check Laravel documentation](https://laravel.com/docs/5.8/validation#custom-validation-rules)):
```php
Validator::extend('cuit', 'GlobalInnovation\Validation\Rules\CUIT@validate');
Validator::replacer('cuit', "The CUIT is invalid.");
```Remember to add the following line bellow `namespace` line of the `AppServiceProvider` class:
```
use Illuminate\Support\Facades\Validator;
```