Bug 31746

Summary: Patron record saves when cardnumber required and value entered is whitespace
Product: Koha Reporter: John Yorio <jyorio>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, sally.healey
Version: 21.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31719
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description John Yorio 2022-10-12 17:41:28 UTC
This happens both with the full patron entry form and the quick add form.

When the cardnumber is required, it's possible to enter either spaces or non-printing characters into the cardnumber field and save the record. That is, there's nothing but whitespace. The value of cardnumber saved in the database in this case is NULL.

It would be helpful if Koha verified that the cardnumber field contained something other than whitespace and prevented it from saving if it did not, when the cardnumber is required.

I'm not sure if this relates to bug 30978 in any way, but I'm referencing it here just in case.