You can build the Google Form with a Google Script. I am not sure if that will work dynamically while the form is in use or if you have to set the range of values for number validation up front and they remain static once the form is created.
The following resource may come in handy: Class TextValidationBuilder
Even if it says Text Validation, it refers to a short answer question type:
// Add a text item to a form and require it to be a number within a range.
var textItem = form.addTextItem().setTitle('Pick a number between 1 and 100?');
var textValidation = FormApp.createTextValidation()
.setHelpText('Input was not a number between 1 and 100.')
If the whole form is built via the script, you could potentially use the result of the previous question as the higher limit in the .requireNumberBetween statement above. Worth a try.