mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 00:07:14 +00:00
Prevent non-numeric input in contesting-serial fields
This commit is contained in:
commit
55d24cd52b
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user