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') },
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)};
return @errors;
}
-This mixin provides a function C<validate_ibans> that returns an list
+This mixin provides a function C<validate_ibans> 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<iban>
is used.