Argentine Fields plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Argentine Fields by Nodo N

Community

Argentine form fields, table columns and validation rules: CUIT/CUIL, DNI, CBU/CVU, alias, phone, pesos, provinces and IVA condition.

Tags: Tables Table Column Form Field Form Editor Field Form Layout Forms
Supported versions:
5.x
Nodo N avatar Author: Nodo N

Package health

Automated checks of this plugin's Composer package

92 / 100
Security 85
Maintenance 100
Ecosystem 100
15 checks
  • Skipped: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Skipped: Dependabot or Renovate configured
  • Skipped: Dependency update cooldown configured
  • Failed: Provides a security policy — View details on Plumb
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
  • Passed: composer.lock not committed by library — composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.3 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 2 weeks ago

Documentation

Argentine fields for Filament

Form fields, table columns, infolist entries and validation rules for the data every Argentine app asks for: CUIT/CUIL, DNI, CBU/CVU, alias, phone numbers, amounts in pesos, provinces and VAT condition.

  • Real validation: CUIT and CBU check digits, not just a regex.
  • Typing masks (20-12345678-6, 12.345.678, $ 1.234,56).
  • Stores clean values (only digits, plain decimals) and shows them formatted.
  • The validation rules also work in plain Laravel, without Filament.
  • Messages in Spanish and English.

Requires PHP 8.3+ and Filament 5.

#Installation

composer require nodonhq/filament-argentina

#Form fields

use NodonHq\FilamentArgentina\Forms\CbuAliasInput;
use NodonHq\FilamentArgentina\Forms\CbuInput;
use NodonHq\FilamentArgentina\Forms\CuitInput;
use NodonHq\FilamentArgentina\Forms\DniInput;
use NodonHq\FilamentArgentina\Forms\PesosInput;
use NodonHq\FilamentArgentina\Forms\PhoneInput;
use NodonHq\FilamentArgentina\Forms\ProvinceSelect;
use NodonHq\FilamentArgentina\Forms\TaxConditionSelect;

CuitInput::make('cuit')->label('CUIT'),            // stores 20123456786
CuitInput::make('cuit')->company(),                // only legal entities (30, 33, 34)
CuitInput::make('cuil')->person(),                 // only individuals
DniInput::make('dni'),                             // stores 12345678
CbuInput::make('cbu'),                             // CBU or CVU, stores the 22 digits
CbuInput::make('cvu')->cvuOnly(),                  // or ->cbuOnly()
CbuAliasInput::make('alias'),
PhoneInput::make('phone'),                         // stores 1123456789
PhoneInput::make('whatsapp')->e164(mobile: true),  // stores +5491123456789
PesosInput::make('price'),                         // typed 1.234,56, stores "1234.56"
ProvinceSelect::make('province'),                  // stores the ISO 3166-2 code (AR-X)
TaxConditionSelect::make('tax_condition'),         // stores ARCA's id (5 = Consumidor Final)

To keep the separators in the database, add ->storeFormatted() to the CUIT, DNI or CBU fields.

Field Mask / input Stored value Validation
CuitInput 99-99999999-9 20123456786 prefix and modulo 11 check digit
DniInput 9.999.999 / 99.999.999 12345678 7 or 8 digits
CbuInput 99999999 99999999999999 22 digits both check digits; CBU, CVU or either
CbuAliasInput max. 20 chars as typed 6–20 letters, digits, . or -
PhoneInput +54 prefix 10 national digits or E.164 area code + number
PesosInput $ 1.234,56 "1234.56" amount
ProvinceSelect 24 jurisdictions AR-C, AR-B, ... enum
TaxConditionSelect ARCA list 1, 4, 5, 6, ... enum

#Table columns and infolist entries

use NodonHq\FilamentArgentina\Tables\CbuColumn;
use NodonHq\FilamentArgentina\Tables\CuitColumn;
use NodonHq\FilamentArgentina\Tables\DniColumn;
use NodonHq\FilamentArgentina\Tables\PesosColumn;

CuitColumn::make('cuit'),       // 20-12345678-6
DniColumn::make('dni'),         // 12.345.678
CbuColumn::make('cbu'),         // 01105995 40000000123457
PesosColumn::make('price'),     // $ 1.234,56 (right aligned)

The same exist for infolists in NodonHq\FilamentArgentina\Infolists: CuitEntry, DniEntry, CbuEntry and PesosEntry.

For provinces and VAT condition, cast the attribute to the enum and use a regular TextColumn: it shows the label.

protected function casts(): array
{
    return [
        'province' => \NodonHq\FilamentArgentina\Enums\Province::class,
        'tax_condition' => \NodonHq\FilamentArgentina\Enums\TaxCondition::class,
    ];
}

#Validation rules (Laravel, no Filament needed)

use NodonHq\FilamentArgentina\Rules\ArgentinePhone;
use NodonHq\FilamentArgentina\Rules\Cbu;
use NodonHq\FilamentArgentina\Rules\CbuAlias;
use NodonHq\FilamentArgentina\Rules\Cuit;
use NodonHq\FilamentArgentina\Rules\Dni;
use NodonHq\FilamentArgentina\Rules\PesosAmount;

$request->validate([
    'cuit' => ['required', new Cuit],
    'company_cuit' => ['required', Cuit::make()->company()],
    'dni' => [new Dni],
    'cbu' => [new Cbu],
    'cvu' => [Cbu::make()->cvuOnly()],
    'alias' => [new CbuAlias],
    'phone' => [new ArgentinePhone],
    'amount' => [new PesosAmount],
]);

The checks behind them are available as plain helpers in NodonHq\FilamentArgentina\Support (Cuit::isValid(), Cuit::format(), Cbu::isCvu(), Phone::e164(), Pesos::parse(), ...).

#Translations

Messages come in Spanish (es) and English (en) and follow the app locale. To change them:

php artisan vendor:publish --tag=filament-argentina-translations

#Notes and limits

  • Phone numbers must include the area code. The old mobile format with 15 (011 15 1234-5678) is not accepted: use 11 1234-5678 or +54 9 11 1234-5678.
  • The CUIT check is offline: it verifies the number is well formed, not that it is registered with ARCA.
  • CUIT prefixes accepted by default: 20, 23, 24, 25, 26, 27 (individuals) and 30, 33, 34 (legal entities).

#Testing

composer test
composer analyse

#License

MIT. See LICENSE.md.

The author

Nodo N avatar Author: Nodo N

Nodo N builds Filament plugins and themes for small businesses in Argentina and beyond: practical tools for the people who use the panel every day.

Plugins
2

From the same author