Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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;
```