Added some input checking

pull/3/head
Davide Bongiovanni 8 years ago
parent f5b1b67fc7
commit c8dd7d9327

@ -100,6 +100,22 @@ function save(partID) {
alert('Invalid location field. Only numbers accepted.');
return;
}
if(type_v.length > 25) {
alert('Manufacturer name too long (max 25 characters).')
return;
}
if(description_v.length > 200) {
alert('Description too long (max 200 characters).')
return;
}
if(quantity_v.length > 10) {
alert('Quantity info too long (max 10 characters).')
return;
}
if(notes_v.length > 200) {
alert('Notes too long (max 200 characters).')
return;
}
partnos = partno_v.split(' ');

Loading…
Cancel
Save