Bug 30864: Add validation to password_expiry_days

When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-06-01 14:29:59 +02:00 committed by Tomas Cohen Arazi
parent 7306f945ce
commit 79396ae625
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -64,6 +64,9 @@ $(document).ready(function() {
},
enrollment_period: true
},
password_expiry_days: {
digits: true
},
dateofbirthrequired: {
digits: true
},