JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.14k stars 298 forks source link

Issue with simple alphanumerical mask with blank spaces #1361

Open ivgome opened 1 month ago

ivgome commented 1 month ago

I'm encountering a problem with the use of the mask when working with simple alphanumeric fields (no special characters) with blank spaces.

We limit the maximum number of characters using input maxLength directly, however it is not possible to enter white spaces.

The alternative is to use a mask of the type: "A A", but I see it as very limited, since I don't know how many words the user is going to search for, therefore we cannot limit the number of spaces entered between words.

We have used a regex pattern for now and it works well, but it's strange not to find an alternative playing with the mask itself and [specialCharacters] or similar.

version 14.3.3.

thanks.