Argentinian CUIT and CUIL Rules for laravel validation
$ composer require iutrace/laravel-cuit-validator
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';
}
}