if only integer values maybe you could use a dropdown menu? You could implement a message when inserting a false value,
lets pretend cell2 is your input widget:
OnInput:
if(OR(len(NUMBER(#cell2))==0;#cell2<40;#cell2>90);
MESSAGE("Error - only numbers between 40 and 90 allowed")
#cell2=EMPTY()
)