Input mask or input range for text inputs


#1

Input mask for text inputs.

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.


#2

Hi @Velara,

do you mean allowing the insertion of numbers only?


#3

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.).


#4

So, a way to set the input’s datatype?


#5

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…


#6

Ok, thank you Pablo.


#7

input type="number" is coming shortly. I know this isn’t what you’re asking for, but it’s a start :slight_smile:

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.