Added some input checking
This commit is contained in:
@@ -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(' ');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user