[go: up one dir, main page]

Skip to content

iutrace/laravel-cuit-validator

Repository files navigation

CUIT/CUIL Validator

Argentinian CUIT and CUIL Rules for laravel validation

Installation

$ composer require iutrace/laravel-cuit-validator

Usage

Example of a required and valid CUIT field

use Illuminate\Routing\Controller;
use Illuminate\Http\Request;

class ExampleController extends Controller
{   
    public function verify(Request $request)
    {
        $data = $request->validate([
            'cuit' => [
                'required|cuit',
            ],
        ]);
        
        return $data['cuit'] . ' is a valid CUIT';
    }
}

Example of a required and valid CUIL field

use Illuminate\Routing\Controller;
use Illuminate\Http\Request;

class ExampleController extends Controller
{   
    public function verify(Request $request)
    {
        $data = $request->validate([
            'cuil' => [
                'required|cuil',
            ],
        ]);
        
        return $data['cuil'] . ' is a valid CUIL';
    }
}