View | Details | Raw Unified | Return to bug 33940
Collapse All | Expand All

(-)a/Koha/Policy/Patrons/Cardnumber.pm (-2 / +1 lines)
Lines 85-91 sub get_valid_length { Link Here
85
    my ($class)    = @_;
85
    my ($class)    = @_;
86
    my $borrower   = Koha::Database->new->schema->resultset('Borrower');
86
    my $borrower   = Koha::Database->new->schema->resultset('Borrower');
87
    my $field_size = $borrower->result_source->column_info('cardnumber')->{size};
87
    my $field_size = $borrower->result_source->column_info('cardnumber')->{size};
88
    my ( $min, $max ) = ( 0, $field_size );    # borrowers.cardnumber is a nullable varchar(20)
88
    my ( $min, $max ) = ( 0, $field_size );
89
    $min = 1 if C4::Context->preference('BorrowerMandatoryField') =~ /cardnumber/;
89
    $min = 1 if C4::Context->preference('BorrowerMandatoryField') =~ /cardnumber/;
90
    if ( my $cardnumber_length = C4::Context->preference('CardnumberLength') ) {
90
    if ( my $cardnumber_length = C4::Context->preference('CardnumberLength') ) {
91
91
92
- 

Return to bug 33940