sanniassin / react-input-mask

Input masking component for React. Made with attention to UX.
MIT License
2.22k stars 258 forks source link

Regular expressions NOT WORK! #199

Open AndreyZavarin opened 4 years ago

AndreyZavarin commented 4 years ago

This example does not work at all!

// Canadian postal code mask
const firstLetter = /(?!.*[DFIOQU])[A-VXY]/i;
const letter = /(?!.*[DFIOQU])[A-Z]/i;
const digit = /[0-9]/;
const mask = [firstLetter, digit, letter, " ", digit, letter, digit];
return <InputMask mask={mask} />;
ErikGMatos commented 4 years ago

AndreyZavarin

I have also been testing all day today and it did not work with regex, but I realized now that I was looking at the version 3.0 documentation, but actually at the moment the stable version is version 2, I will test with version 2 now if it works.

reintroducing commented 4 years ago

https://github.com/sanniassin/react-input-mask/issues/197

SomtoUgeh commented 4 years ago

Please any updates on this issue? @reintroducing @ErikGMatos

reintroducing commented 4 years ago

@SomtoUgeh did you read the comments above?

SomtoUgeh commented 4 years ago

@reintroducing Yes I did .. I am still experiencing the same issue .. I asked to get updates as regards the test he said he was going to perform

Multi-Thinker commented 3 years ago

Still the same!

AndrejGajdos commented 3 years ago

+1

priyankadevgan1992 commented 2 years ago

+1

gfox-dev commented 1 year ago

+1

gfox-dev commented 1 year ago

Maybe let's do a fork and fix it? cause this lib seems to be nice even in 2022