$check_re->($invoice_recipient_data, 'address_row2', qr{^.{0,70}$});
$check_re->($invoice_recipient_data, 'countrycode', qr{^[A-Z]{2}$});
+ my %ref_nr_regexes = (
+ QRR => qr{^\d{27}$},
+ NON => qr{^$},
+ );
$check_re->($ref_nr_data, 'type', qr{^(?:QRR|SCOR|NON)$});
- $check_re->($ref_nr_data, 'ref_number', qr{^\d{27}$});
+ $check_re->($ref_nr_data, 'ref_number', $ref_nr_regexes{$ref_nr_data->{type}});
}
sub generate {
=item C<ref_number>
-27 characters, numerical. QR-Reference.
+QR-Reference: 27 characters, numerical; without Reference: empty.
=back