# HG changeset patch # User Nicholas Jillings # Date 1492590606 -3600 # Node ID a13adc8f8d3de8ea45ae562cd2edd232566791d0 # Parent 07fcccd5e1a68c1e38430794f411bda28e8ff4d2 #201 Fixed diff -r 07fcccd5e1a6 -r a13adc8f8d3d js/core.js --- a/js/core.js Tue Apr 18 15:35:11 2017 +0200 +++ b/js/core.js Wed Apr 19 09:30:06 2017 +0100 @@ -873,7 +873,7 @@ function processNumber(node) { var input = this.popupContent.getElementsByTagName('input')[0]; - if (node.mandatory === true && input.value.length === 0) { + if (node.specification.mandatory === true && input.value.length === 0) { interfaceContext.lightbox.post("Error", 'This question is mandatory. Please enter a number'); return false; } @@ -882,12 +882,12 @@ interfaceContext.lightbox.post("Error", 'Please enter a valid number'); return false; } - if (enteredNumber < node.min && node.min !== null) { - interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.min); + if (enteredNumber < node.specification.min && node.specification.min !== null) { + interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.specification.min); return false; } - if (enteredNumber > node.max && node.max !== null) { - interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.max); + if (enteredNumber > node.specification.max && node.specification.max !== null) { + interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.specification.max); return false; } node.response = input.value;