Limiting input to integers or floats
I am creating an item where test-taker has to enter just a number for answer. I am using inline text entry interaction.
I need to make that only numeric answers should be accepted (e. g. "12", sometimes "2.3" or "2,3" should be accepted, but "one", "2c" shouldn't be accepted).
interaction has property constrains, where you can define a pattern. As I understand "[0-9]" should make only number from 0 to 9 a valid response , but now it checks whether in a hole string there is number, so answers like "1a" or "kl 9" is accepted.
Am I doing something wrong or maybe there is some other way to make this possible?