Closed Lukowalski97 closed 6 months ago
Or what else comes to my mind - maybe adding some log if custom pattern name may clash with existing expression would be nice
@Lukowalski97 Thanks for using Ngx-mask. We update our documentation, with conflict custom pattern.
🚀 feature request
Description
During development I had a case where I needed to create a mask for hexadecimal values only, and I created my own custom pattern like this: {h: {pattern: new RegExp('[a-fA-F0-9]')}};
From documentation I knew only about default patterns which are 0, 9, A, S, U, L. Unfortunately h that I used is conflicting with MaskExpression.Hour and it resulted in a weird behaviour when I typed things like 24, 25 etc. In documentation I did not find info that patterns cannot clash with any of expressions and what are those expressions (or where to look for them). In my case I just changed pattern from h to z but it would be nice to have such info in documentation that custom patterns cannot clash with existing expressions.
Describe the solution you'd like
Mention about it in documentation