Revision 828e417c
Von Kivitendo Admin vor fast 8 Jahren hinzugefügt
SL/DB/Helper/IBANValidation.pm | ||
---|---|---|
6 | 6 |
use Carp; |
7 | 7 |
use SL::Locale::String qw(t8); |
8 | 8 |
|
9 |
my $_validater;
|
|
9 |
my $_validator;
|
|
10 | 10 |
my %_countries = ( |
11 | 11 |
AT => { len => 20, name => t8('Austria') }, |
12 | 12 |
BE => { len => 16, name => t8('Belgium') }, |
... | ... | |
29 | 29 |
|
30 | 30 |
return () unless length($iban); |
31 | 31 |
|
32 |
$_validater //= Algorithm::CheckDigits::CheckDigits('iban');
|
|
32 |
$_validator //= Algorithm::CheckDigits::CheckDigits('iban');
|
|
33 | 33 |
|
34 |
return ($::locale->text("The value '#1' is not a valid IBAN.", $iban)) if !$_validater->is_valid($iban);
|
|
34 |
return ($::locale->text("The value '#1' is not a valid IBAN.", $iban)) if !$_validator->is_valid($iban);
|
|
35 | 35 |
|
36 | 36 |
my $country = $_countries{substr($iban, 0, 2)}; |
37 | 37 |
|
Auch abrufbar als: Unified diff
name change: validator statt validater