Prevent non-numeric entries in contesting-serial fields

pull/3023/head
DJ3CE 2024-03-23 17:33:32 +01:00
rodzic 40dc26c120
commit f527be0af0
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -94,10 +94,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;
}
});