Regex with placeholder, not working?
Hi,
Not sure it's bug or feature, but inputmask wont work with placeholder.
Fiddle: http://jsfiddle.net/yocgpp7q/
The regex alias currently doesn't support a placeholder or any visual.
Op Thu Jan 15 2015 at 11:23:11 schreef kamilklosowski < [email protected]>:
Hi,
Not sure it's bug or feature, but inputmask wont work with placeholder.
Fiddle: http://jsfiddle.net/yocgpp7q/
— Reply to this email directly or view it on GitHub https://github.com/RobinHerbots/jquery.inputmask/issues/798.
Is there any chance to implement this in future releases?
@kamilklosowski ,
Yes that will be implemented in the future but
Have a look at http://jsfiddle.net/yocgpp7q/1/
You can also use the second mask
This isn't solution to my problem - i've receive regex from backend unfortunately. So im looking forward to next releases :)
Thanks
There still is now way to get a placeholder working with the RegEx-extension?
@monomorph ,
Unfortunately no. Maybe it's time to spend some time to the regex-extensions.
@RobinHerbots,
is it you maintaining all the extensions too, or are other people involved?
@monomorph,
No, it is a one-man show.
So, go ahead. Plz add "Placeholder support" to the RegEx entension... ;-)
@kamilklosowski , @monomorph ,
I added direct regex support to the inputmask core. Can you have a try and give some feedback. I only tested with some simple regexes.
See the jsfiddle for a usage example.
See updated http://jsfiddle.net/yocgpp7q/16/
Fine, this comes up at the right time. I just got new specs for a project I'm using your inputmasks on. I'll try it out within the next few days and will give feedback.
Thanks for your efforts!
So how about show all static symbols in placeholder and let user to write only dinamic content(classes, groups, sets, etc)? For example http://jsfiddle.net/yocgpp7q/25/ And why this regex work only by using data attribute? http://jsfiddle.net/yocgpp7q/26/
@hxss ,
About the second one see http://jsfiddle.net/yocgpp7q/28/ You need to escape twice to pas \ in js.
For the static symbols, it should but the regex isn't correctly interpreted. I will see why and submit a fix.
Thx for reporting.