Lines 474-479
sub CheckForInvalidFields {
Link Here
|
474 |
push @invalidFields, 'password_has_whitespaces' if $error eq 'has_whitespaces'; |
474 |
push @invalidFields, 'password_has_whitespaces' if $error eq 'has_whitespaces'; |
475 |
} |
475 |
} |
476 |
} |
476 |
} |
|
|
477 |
|
478 |
if ($borrower->{'dateofbirth'}) { |
479 |
my $patron = Koha::Patron->new({ dateofbirth => $borrower->{'dateofbirth'} }); |
480 |
my $age = $patron->get_age; |
481 |
my $borrowercategory = Koha::Patron::Categories->find( $borrower->{'categorycode'} ); |
482 |
my ($low, $high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit); |
483 |
if (($high && ($age > $high)) or ($age < $low)) { |
484 |
push @invalidFields, 'ERROR_age_limitations'; |
485 |
$template->param( age_low => $low); |
486 |
$template->param( age_high => $high); |
487 |
} |
488 |
} |
477 |
|
489 |
|
478 |
return \@invalidFields; |
490 |
return \@invalidFields; |
479 |
} |
491 |
} |
480 |
- |
|
|