Lines 138-144
if ( $action eq 'create' ) {
Link Here
|
138 |
# No point in checking the cardnumber if it's missing and mandatory, it'll just generate a |
138 |
# No point in checking the cardnumber if it's missing and mandatory, it'll just generate a |
139 |
# spurious length warning. |
139 |
# spurious length warning. |
140 |
my $patron = Koha::Patrons->find($borrower{borrowernumber}); |
140 |
my $patron = Koha::Patrons->find($borrower{borrowernumber}); |
141 |
$is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber($borrower{cardnumber}, $patron); |
141 |
$is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron); |
142 |
unless ($is_cardnumber_valid) { |
142 |
unless ($is_cardnumber_valid) { |
143 |
for my $message ( @{ $is_cardnumber_valid->messages } ) { |
143 |
for my $message ( @{ $is_cardnumber_valid->messages } ) { |
144 |
if ( $message eq 'already_exists' ) { |
144 |
if ( $message eq 'already_exists' ) { |
145 |
- |
|
|