New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

granitehldg/filament-iban-input

A Filament IBAN input with validation and formatting
1,106
Install
composer require granitehldg/filament-iban-input
Latest Version:v5.0.1
PHP:^8.2
Laravel:11 · 12 · 13
License:MIT
Last Updated:Nov 10, 2026
Links: GitHub  ·  Packagist
Maintainer: granite

Filament IBAN Input

Latest Version on Packagist Tests Total Downloads License

A Filament form field for IBAN (International Bank Account Number) input with real-time formatting, per-country length validation (ISO 13616), and mod-97 checksum verification.

Features

  • Real-time formatting with country code dropdown
  • Per-country IBAN length validation (ISO 13616, ~100 countries)
  • Mod-97 checksum validation (can be disabled)
  • Server-side + client-side (Alpine.js) validation
  • Dark mode support, LTR-safe, copy-to-clipboard
  • Works with Filament v3, v4 and v5

Requirements

  • PHP ^8.2 with ext-bcmath
  • Laravel with Filament ^3.0 || ^4.0 || ^5.0

Installation

composer require granitehldg/filament-iban-input

The service provider is auto-discovered. No manual registration needed.

Optionally publish the views:

php artisan vendor:publish --tag=filament-iban-input-views

Usage

Basic usage

use Granite\FilamentIban\Forms\Components\IbanInput;

IbanInput::make('iban')
    ->label('Bank Account (IBAN)')
    ->required();

Limit countries

IbanInput::make('iban')
    ->countries(['DE', 'FR', 'NL', 'GB'])
    ->defaultCountry('DE')
    ->required();

Accept all IBAN countries

By default only ['UA', 'EG', 'DE', 'GB', 'FR', 'NL'] are offered. To accept any known ISO 13616 country:

IbanInput::make('iban')
    ->allCountries()
    ->required();

Disable checksum validation

IbanInput::make('iban')
    ->validateChecksum(false) // format/length only
    ->required();

Custom lengths

IbanInput::make('iban')
    ->countries(['ZZ'])
    ->countryLengths(['ZZ' => 6])
    ->validateChecksum(false);

The component stores the complete IBAN as a single string, e.g. DE89370400440532013000.

Helpers

use Granite\FilamentIban\Forms\Components\IbanInput;

IbanInput::validateIbanChecksum('DE89370400440532013000'); // true
IbanInput::normalize('de89 3704 0044 0532 0130 00'); // DE89370400440532013000

See USAGE_EXAMPLE.md for migrations, models, and advanced validation examples.

Validation

Server-side validation checks, in order:

  1. Country code is 2 letters and (unless allCountries()) in the allowed list
  2. Two numeric check digits after the country code
  3. Body length matches the per-country ISO 13616 length
  4. Mod-97 checksum equals 1 (unless disabled)

Empty values pass through so ->required() / ->nullable() behave as expected.

Testing

composer install
vendor/bin/phpunit

Valid IBANs for manual testing:

  • DE89370400440532013000
  • GB29NWBK60161331926819
  • FR1420041010050500013M02606
  • NL91ABNA0417164300
  • UA213223130000026007233566001

Building assets

npm install
npm run build

This compiles resources/css/index.css to resources/dist/filament-iban-input.css. Commit the built file before tagging a release.

Changelog

See CHANGELOG.md for release notes. Follow SemVer: tagged releases (v4.1.0, ...) are what Packagist publishes.

Contributing

Issues and PRs are welcome. Please run tests before submitting.

Security

If you discover a security issue, please email the maintainers privately instead of opening a public issue.

Credits

Developed by Granite Holding.

License

MIT. See LICENSE.

Related Packages

lucasvdh/laravel-iban

A Laravel plugin for IBAN validation

6,977 7
noin/filament-forms-tinyeditor

A TinyMce editor component for Filament

3,939 1
yousefaman/filament-autosave

Automatic form saving for Filament with a visual status indicator, undo, and dra...

3,186 4
lenorix/filament-autosave

Column-by-column autosave for Filament forms: nothing is lost on a closed tab, t...

1,138 18
schmeits/filament-character-counter

A character counter for the TextInput, Textarea and RichEditor fields of Filamen...

320,837 34

Version History

Version Released PHP License
v5.0.1 ^8.2 MIT
v5.0.0 ^8.2 MIT
v4.1.0 ^8.2 MIT
v4.0.0 ^8.2 MIT