changes
This commit is contained in:
@@ -9,3 +9,11 @@ window.onload = function() {
|
||||
function is_positive_integer(val) {
|
||||
return /^\d+$/.test(val);
|
||||
}
|
||||
|
||||
function inventory_new_item_check_input() {
|
||||
return document.getElementById('new-item-name').value.length != 0
|
||||
&& is_positive_integer(document.getElementById('new-item-weight').value)
|
||||
}
|
||||
function check_weight() {
|
||||
return document.getElementById('new-item-weight').validity.valid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user