ngx-mask
ngx-mask copied to clipboard
For support on masks such as email, A*@A*.A* does not work
🐞 bug report
Is this a regression
No, I have seen no versions where this works as expected. We were on ngx-mask 13.something and upgraded to 16.4.2 to see if the problem went away.
Description
A*@A*.A* is allowing values such as abc@a - for some reason the literal dot is never required. If you use an exact A*@A*.AAA, all is good, but this will not work for .ky for example. If you try to do something like A*@A*.AA||A*@A*.AAA||A*@A*.AAAA, only the first mask seems to be valid.
🔬 Minimal Reproduction
I have created a stackblitz on Angular 18 (this happens on Angular 15 as well in our local project) https://stackblitz.com/edit/hmpuzh?file=src%2Fexample%2Fform-field-overview-example.html
In this example we have added a new pattern to allow more than alpha and numeric for the email, but have an example at the bottom using just the pattern A that is out-of-the-box.
🔥 Exception or Error
No error - problem with behavior and for being valid when it should not be
🌍 Your Environment
Angular 18.1.2 on example in stackblitz ( we are also experiencing this on Angular 15.2.10)
does not appear to be browser specific
I do not believe OS or IDE matter.