Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Regex with placeholder, not working?

Open kamilklosowski opened this issue 11 years ago • 13 comments

Hi,

Not sure it's bug or feature, but inputmask wont work with placeholder.

Fiddle: http://jsfiddle.net/yocgpp7q/

kamilklosowski avatar Jan 15 '15 10:01 kamilklosowski

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.

RobinHerbots avatar Jan 15 '15 10:01 RobinHerbots

Is there any chance to implement this in future releases?

kamilklosowski avatar Jan 15 '15 10:01 kamilklosowski

@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

RobinHerbots avatar Jan 15 '15 13:01 RobinHerbots

This isn't solution to my problem - i've receive regex from backend unfortunately. So im looking forward to next releases :)

Thanks

kamilklosowski avatar Jan 16 '15 06:01 kamilklosowski

There still is now way to get a placeholder working with the RegEx-extension?

monomorph avatar Mar 21 '17 09:03 monomorph

@monomorph ,

Unfortunately no. Maybe it's time to spend some time to the regex-extensions.

RobinHerbots avatar Mar 21 '17 10:03 RobinHerbots

@RobinHerbots,

is it you maintaining all the extensions too, or are other people involved?

monomorph avatar Mar 21 '17 11:03 monomorph

@monomorph,

No, it is a one-man show.

RobinHerbots avatar Mar 21 '17 11:03 RobinHerbots

So, go ahead. Plz add "Placeholder support" to the RegEx entension... ;-)

monomorph avatar Mar 22 '17 11:03 monomorph

@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/

RobinHerbots avatar Mar 30 '17 08:03 RobinHerbots

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!

monomorph avatar Apr 14 '17 09:04 monomorph

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 avatar Jun 14 '17 22:06 hxss

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

RobinHerbots avatar Jun 15 '17 07:06 RobinHerbots