Prevent non-numeric input in contesting-serial fields

pull/3047/head
Peter Goodhall 2024-04-02 13:45:00 +01:00 zatwierdzone przez GitHub
commit 55d24cd52b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -88,10 +88,10 @@ $(function () {
});
});
// We don't want spaces to be written in serial
// We don't want anything but numbers to be written in serial
$(function () {
$('#exch_serial_r').on('keypress', function (e) {
if (e.which == 32) {
$('#exch_serial_r, #exch_serial_s').on('keypress', function (e) {
if (e.key.charCodeAt(0) < 48 || e.key.charCodeAt(0) > 57) {
return false;
}
});