JsDaddy / ngx-mask

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

Mixed Type is not respecting the mask. #1312

Closed dinbtechit closed 6 months ago

dinbtechit commented 6 months ago

🐞 bug report

Is this a regression?

Does not appear to be. As it is an issue even on the demo site.

Description

<input mask="AAA 000-S0S" />

when the mask is set to AAA 000-S0S. It should only accept the first 3 should allow characters only, followed by space, number, dash, character, number, character.

Right now it is accepting numbers or character when the mask is AAA.

image

🔬 Minimal Reproduction

Check out the Mixed type in the demo site - https://jsdaddy.github.io/ngx-mask/#5

dinbtechit commented 6 months ago

Turns out we have to use the letter S instead of A to enforce strict characters. The documentation is not clear.

<input mask="SSS 000-S0S" />
andriikamaldinov1 commented 6 months ago

@dinbtechit Thanks for using Ngx-mask. It link for our documentation - https://github.com/JsDaddy/ngx-mask/blob/develop/USAGE.md

All work as expected. The screenshot is attached below

Screenshot 2024-03-26 at 12 35 40