uNmAnNeR / imaskjs

vanilla javascript input mask
https://imask.js.org
MIT License
4.96k stars 258 forks source link

Regexp mask doesn't work in angular 18 #1087

Closed AntonBobylev closed 2 weeks ago

AntonBobylev commented 3 weeks ago

Describe the bug Regular expression mask doesn't work in angular 18. image

To Reproduce

https://stackblitz.com/edit/stackblitz-starters-7ul1ul

Expected behavior Regular expression should be applied on user's input.

Environment:

Additional note

If it possible, please, provide me how to use imask to make sure user typed the correct email

jeffrey-planon commented 2 weeks ago

You need to allow for 0 to 6 characters, so instead of this: /^[a-z]{6}$/, use this: /^[a-z]{0,6}$/,

AntonBobylev commented 2 weeks ago

Oh, sheesh. I'm sorry, my bad. Thank you! @jeffrey-planon