Skip to content

Commit

Permalink
Swiss QR-Bill: QrBill.pm: Verbessere Adress-Validierung
Browse files Browse the repository at this point in the history
  • Loading branch information
stsc committed Oct 16, 2023
1 parent 8b80b7b commit 8f18161
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions SL/Helper/QrBill.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use File::Spec ();
use Imager ();
use Imager::QRCode ();

our $VERSION = '0.01';
our $VERSION = '0.02';

my %Config = (
img_dir => 'image',
Expand Down Expand Up @@ -105,12 +105,12 @@ sub _init_check {
'biller data' => [
[ 'address_type', qr{^[KS]$} ],
[ 'company', qr{^.{1,70}$} ],
[ 'address_row1', qr{^.{0,70}$} ], # combined (K)
[ 'address_row2', qr{^.{0,70}$} ], # "
[ 'street', qr{^.{0,70}$} ], # structured (S)
[ 'street_no', qr{^.{0,16}$} ], # "
[ 'postalcode', qr{^.{0,16}$} ], # "
[ 'city', qr{^.{0,35}$} ], # "
[ 'address_row1', qr{^.{1,70}$} ], # combined (K)
[ 'address_row2', qr{^.{1,70}$} ], # "
[ 'street', qr{^.{1,70}$} ], # structured (S)
[ 'street_no', qr{^.{1,16}$} ], # "
[ 'postalcode', qr{^.{1,16}$} ], # "
[ 'city', qr{^.{1,35}$} ], # "
[ 'countrycode', qr{^[A-Z]{2}$} ],
],
'payment information' => [
Expand All @@ -120,12 +120,12 @@ sub _init_check {
'invoice recipient data' => [
[ 'address_type', qr{^[KS]$} ],
[ 'name', qr{^.{1,70}$} ],
[ 'address_row1', qr{^.{0,70}$} ], # combined (K)
[ 'address_row2', qr{^.{0,70}$} ], # "
[ 'street', qr{^.{0,70}$} ], # structured (S)
[ 'street_no', qr{^.{0,16}$} ], # "
[ 'postalcode', qr{^.{0,16}$} ], # "
[ 'city', qr{^.{0,35}$} ], # "
[ 'address_row1', qr{^.{1,70}$} ], # combined (K)
[ 'address_row2', qr{^.{1,70}$} ], # "
[ 'street', qr{^.{1,70}$} ], # structured (S)
[ 'street_no', qr{^.{1,16}$} ], # "
[ 'postalcode', qr{^.{1,16}$} ], # "
[ 'city', qr{^.{1,35}$} ], # "
[ 'countrycode', qr{^[A-Z]{2}$} ],
],
'reference number data' => [
Expand Down

0 comments on commit 8f18161

Please sign in to comment.