556eb67718
This patch finishes the work started in one of the previous follow-ups and allows CardnumberLength to be set to a value like ',5'. In conjunction with not including cardnumber in BorrowerMandatoryField, this allows a cardnumber to not be required but, if present, to not exceed the specified length. This patch also updates t/db_dependent/Members.t so that it runs in a transaction, tests the new return value of checkcardnumber, and manages the CardnumberLength syspref. To test: [1] Verify that prove -v t/db_dependent/Members.t and prove -v t/Members/cardnumber.t pass. [2] Set CardnumberLength to ",5" and take cardnubmer out of the BorrowerMandatoryField list. [3] Verify that you can save a patron record without a cardnumber, but if you supply one, that it can be at most 5 characters long. [4] Add cardnumber back to BorrowerMandatoryField. This time, the minimum length is 1 even though CardnumberLength is ",5". Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
||
---|---|---|
.. | ||
cardnumber.t |