X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FIBANValidation.pm;h=bc4cbf4511d061572a2f12d4b3f5163e3d4784e1;hb=972b87711cb3c7543d585ceedca0eda2058aa6d7;hp=651b2e608edabd4600a32efff7428806c067f3e7;hpb=07a768c3e250b258f8abcbf6c3a430bbddbfe664;p=kivitendo-erp.git diff --git a/SL/DB/Helper/IBANValidation.pm b/SL/DB/Helper/IBANValidation.pm index 651b2e608..bc4cbf451 100644 --- a/SL/DB/Helper/IBANValidation.pm +++ b/SL/DB/Helper/IBANValidation.pm @@ -6,7 +6,7 @@ use Algorithm::CheckDigits (); use Carp; use SL::Locale::String qw(t8); -my $_validater; +my $_validator; my %_countries = ( AT => { len => 20, name => t8('Austria') }, BE => { len => 16, name => t8('Belgium') }, @@ -29,9 +29,9 @@ sub _validate { return () unless length($iban); - $_validater //= Algorithm::CheckDigits::CheckDigits('iban'); + $_validator //= Algorithm::CheckDigits::CheckDigits('iban'); - return ($::locale->text("The value '#1' is not a valid IBAN.", $iban)) if !$_validater->is_valid($iban); + return ($::locale->text("The value '#1' is not a valid IBAN.", $iban)) if !$_validator->is_valid($iban); my $country = $_countries{substr($iban, 0, 2)}; @@ -82,12 +82,12 @@ SL::DB::Helper::IBANValidation - Mixin for validating IBAN attributes return @errors; } -This mixin provides a function C that returns an list +This mixin provides a function C that returns a list of error messages, one for each attribute that fails the IBAN validation. If all attributes are valid or empty then an empty list is returned. -The names of attributes to check can be given as a import list to the +The names of attributes to check can be given as an import list to the mixin package. If no attributes are given the single attribute C is used.