Input Masking


#1

Is it possible to mask a text input to always be in this format?

###-###-####

I’m sure there is a way, I just can’t seem to find it. Maybe I’m looking to hard or need a beer …


#2

Well, apparently opening a beer was the key. :wink:

It hit me that ‘Validate -> Pattern’ is what I needed. Works wonderfully. Love Wappler.

Pattern: [0-9]{3}-[0-9]{3}-[0-9]{4}


#3

Thanks @brad. Just what I needed too.


#4

This took me quite a while to get right… It’s the validation pattern for date time in the following format:

YYYY-MM-DD hh:mm:ss

Pattern:

^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01]) (0\d|1\d|2[0-3]):[0-5]\d:[0-5]\d$

May help someone else trying to validate the same?

:wink: