BankAccount-Validator-UK

 view release on metacpan or  search on metacpan

lib/BankAccount/Validator/UK.pm  view on Meta::CPAN

package BankAccount::Validator::UK;

$BankAccount::Validator::UK::VERSION   = '0.67';
$BankAccount::Validator::UK::AUTHORITY = 'cpan:MANWAR';

=head1 NAME

BankAccount::Validator::UK - Interface to validate UK bank account.

=head1 VERSION

Version 0.67

=cut

use 5.006;
use Data::Dumper;
use BankAccount::Validator::UK::Rule;

use Moo;
use namespace::autoclean;

has sc         => (is => 'rw');
has an         => (is => 'rw');
has mod        => (is => 'rw');
has attempt    => (is => 'rw');
has last_ex    => (is => 'rw');
has trace      => (is => 'rw');
has debug      => (is => 'ro', default => sub { 0 });
has last_check => (is => 'rw', default => sub { 0 });
has multi_rule => (is => 'ro', default => sub { 0 });
has sort_code  => (is => 'ro', default => sub { BankAccount::Validator::UK::Rule::get_sort_codes() });

=head1 DESCRIPTION

The module uses the algorithm provided by VOCALINK to validate the bank sort code
and account number.  It is  done by modulus  checking  method as specified in the
document which is available on their website L<VOCALINK|https://www.vocalink.com/tools/modulus-checking/>
It currently supports the document L<v8.50|https://www.vocalink.com/media/vu1advew/validating-account-numbers-uk-modulus-checking-v850.pdf> drafted 26th July 2025.

Institutions covered by this document are below:

=over 4

=item * Allied Irish

=item * Bank of England

=item * Bank of Ireland

=item * Bank of Scotland

=item * Barclays

=item * Bradford and Bingley Building Society

=item * Charity Bank

=item * Citibank

=item * Clear Bank

=item * Clydesdale

=item * Contis Financial Services

=item * Co-Operative Bank

=item * Coutts

=item * First Trust

=item * Halifax

=item * Hoares Bank

=item * HSBC

=item * Lloyds

=item * Metro Bank



( run in 0.576 second using v1.01-cache-2.11-cpan-5735350b133 )