Use case
Suzy has a plugin that adds ellipses (ellipsi?) to the stage. In her UI she has a few fields for setting the width and height. She notices she can enter letters and numbers into the fields. She uses an input mask or input range to signify a number field.
To me it sounds like (or at least that’s what I’ve voted for) an ability to define “patterns” for inputs in general (that can, but don’t have to be numbers – also dates etc. could be implemented that way) and numerical inputs (where one’s able to increment or decrement the value etc.).
Not necessarily the data type, but the format the input should have (digit-digit-letter), so you could easily parse the input since it would follow the specified format…
input type="number" is coming shortly. I know this isn’t what you’re asking for, but it’s a start
HTML5 Validation support is on our backlog, which allow the ability to specify a pattern attribute. I think that will address this issue, but LMK if you think otherwise.
The support for <input type="number"> that Kerri mentioned is now available in XD 18 (the April release that just went live today). Be sure to set your plugin’s minVersion accordingly if you rely on this HTML feature.